C Programming :: Strings
-
What will be the output of the program ?
#include
int main() { static char s[25] = "The cocaine man"; int i=0; char ch; ch = s[++i]; printf("%c", ch); chc= s[i++]; printf("%c", ch); ch = i++[s]; printf("%c", ch); ch = ++i[s]; printf("%c", ch); return 0; } -
What will be the output of the program in 16-bit platform (Turbo C under DOS) ?
#include
int main() { printf("%d, %d, %d", sizeof(3.0f), sizeof('3'), sizeof(3.0)); return 0; } -
If char=1, int=4, and float=4 bytes size, What will be the output of the program ?
#include
-
If the size of pointer is 32 bits What will be the output of the program ?
#include
int main() { char a[] = "Visual C++"; char *b = "Visual C++"; printf("%d, %d\n", sizeof(a), sizeof(b)); printf("%d, %d", sizeof(*a), sizeof(*b)); return 0; } -
What will be the output of the program ?
#include
-
What will be the output of the program ?
#include
int main() { char str1[] = "Hello"; char str2[10]; char *t, *s; s = str1; t = str2; while(*t=*s) *t++ = *s++; printf("%s\n", str2); return 0; } -
What will be the output of the program ?
#include
int main() { char str[] = "Fresher\0GATE\0"; printf("%d\n", sizeof(str)); return 0; } -
What will be the output of the program ?
#include
int main() { char str[25] = "FresherGate"; printf("%s\n", &str+2); return 0; } -
What will be the output of the program ?
#include
int main() { char str = "FRESHERGATE"; printf("%s\n", str); return 0; } -
What will be the output of the program ?
#include