What is the output of the following problem ?

			  		

Loading

Practice Strings – What is the output of the following problem ?


#include
int main()
{
char *str = "12345";
printf("%c %c %c
", *str, *(str++), *(str++));
return 0;
}

What is the output of the following problem ?

			  		

Loading

Practice Strings – What is the output of the following problem ?


#include
int main()
{
char *c;
c = "Hello";
printf("%s
", c);
return 0;
}

What will be the result of the following program?

Loading

Practice Strings – What will be the result of the following program?


#include
#include
char *gxxx(){
static char xxx[1024];
return xxx;
}
int main(){
char *g="string";
strcpy(gxxx(),g);
g = gxxx();
strcpy(g,"oldstring");
printf("The string is : %s",gxxx());
return 0;
}

What will be output of the following “C” code?

Loading

Practice Strings – What will be output of the following “C” code?


#include
int main()
{
char *s = "Hello";
printf("%s",(s+1));
return 0;
}

What will be output of the following “c” code?

Loading

Practice Strings – What will be output of the following “c” code?


#include
void main()
{
char s[]="main";
int i;
for(i=0; s[i]; i++)
printf("%c %c %c %c", s[i], *(s+i), *(i+s),i[s]);
}

What will be the output of the following program on GCC compiler?

Loading

Practice Strings –

What will be the output of the following program on GCC compiler?

#include <stdio.h> 
int main() {
char str[]="MalayalaM";
char *s;
s= str + 8;
while(s>=str){
printf("%c",*s);
s--;
}
return 0;
}

What will be the output of the folllowing program on GCC compiler?<

Loading

Practice Strings –

What will be the output of the folllowing program on GCC compiler?

#include <stdio.h>  
int main() {
char s[]="Hello india";
int i=0;
while(s[i]){
if(s[i]!=)
s[i]=s[i]+1;
i++;
}
printf("%s ",s);
return 0;
}