C Programming :: Strings
-
What will be the output of the program ?
#include
int main() { printf(5+"FresherGATE\n"); return 0; } -
What will be the output of the program ?
#include
int main() { char sentence[80]; int i; printf("Enter a line of text\n"); gets(sentence); for(i=strlen(sentence)-1; i >=0; i--) putchar(sentence[i]); return 0; } -
What will be the output of the program ?
#include
-
What will be the output of the program (Turbo C in 16 bit platform DOS) ?
#include
int main() { char *str1 = "Fresher"; char *str2 = "GATE"; char *str3; str3 = strcat(str1, str2); printf("%s %s\n", str3, str1); return 0; } -
If the size of pointer is 4 bytes then What will be the output of the program ?
#include
int main() { char *str[] = {"Frogs", "Do", "Not", "Die", "They", "Croak!"}; printf("%d, %d", sizeof(str), strlen(str[0])); return 0; } -
What will be the output of the program in Turbo C?
#include
-
What will be the output of the program ?
#include
int main() { char str1[] = "Hello"; char str2[] = "Hello"; if(str1 == str2) printf("Equal\n"); else printf("Unequal\n"); return 0; } -
What will be the output of the program ?
#include
int main() { char t; char *p1 = "Fresher", *p2; p2=p1; p1 = "GATE"; printf("%s %s\n", p1, p2); return 0; } -
What will be the output of the program ?
#include
int main() { printf("%c\n", "abcdefgh"[4]); return 0; } -
What will be the output of the following program in 16 bit platform assuming that 1022 is memory address of the string "Hello1" (in Turbo C under DOS) ?
#include
int main() { printf("%u %s\n", &"Hello1", &"Hello2"); return 0; }