Skip to content

Tag Archives: C-String-Question

Given a non-empty string S of uppercase alphabets of length L and the task is to find the longest string from the given string with… Read More
Given a string S and an integer K. The task is to form a string T such that the string T is a reordering of… Read More
Given a string array of M words and a dictionary of N words. The task is to check if the given string of words can… Read More
Given a string of digits and characters. Write a program to find the number with the maximum number of digits in a string. Note: The… Read More
Given a string, check if it is Colindrome or not. A string is said to be colindrome if it has consecutive 3 alphabets followed by… Read More
Given a string S, we need to write a program to check if it is possible to construct the given string S by performing any… Read More
We have learned about some basic string manipulation functions available in PHP in the article PHP | String . In this article, we will learn… Read More
PHP serves us with many built-in methods which can be used to manipulate strings. In this article, we will learn about how to reverse a… Read More
Strings can be seen as a stream of characters. For example, ‘G’ is a character and ‘GeeksforGeeks’ is a string. We have learned about basics… Read More
Output of following C program? Assume that all necessary header files are included int main() {     char *s1 = (char *)malloc(50);     char *s2 = (char… Read More
Predict the output of following program, assume that a character takes 1 byte and pointer takes 4 bytes. #include <stdio.h> int main() {     char *str1… Read More
Assume that a character takes 1 byte. Output of following program? #include<stdio.h> int main() {     char str[20] = "GeeksQuiz";     printf ("%d", sizeof(str));     return 0; }… Read More
int main() {     char p[] = "geeksquiz";     char t;     int i, j;     for(i=0,j=strlen(p); i<j; i++)     {         t = p[i];         p[i] = p[j-i];         p[j-i] = t;… Read More
Output of following program #include <stdio.h> int fun(char *p) {     if (p == NULL || *p == '\0') return 0;     int current = 1, i… Read More
Predict the output of the following program: #include <stdio.h> int main() {     char str[] = "%d %c", arr[] = "GeeksQuiz";     printf(str, 0[arr], 2[arr + 3]);… Read More