C Programming :: Control Instructions
-
What will be the output of the program?
#include int main() { int i=0; for(; i5; i++); printf("%d", i); return 0; } -
What will be the output of the program?
#include int main() { char str[]="C-program"; int a = 5; printf(a >10?"Ps\n":"%s\n", str); return 0; } -
What will be the output of the program?
#includeint main() { int a = 500, b = 100, c; if(!a >= 400) b = 300; c = 200; printf("b = %d c = %d\n", b, c); return 0; } -
What will be the output of the program?
#include int main() { unsigned int i = 65535; /* Assume 2 byte integer*/ while(i++ != 0) printf("%d",++i); printf("\n"); return 0; } -
What will be the output of the program?
#include int main() { int x = 3; float y = 3.0; if(x == y) printf("x and y are equal"); else printf("x and y are not equal"); return 0; } -
What will be the output of the program, if a short int is 2 bytes wide?
#include int main() { short int i = 0; for(i5 && i>=-1; ++i; i>0) printf("%u,", i); return 0; } -
What will be the output of the program?
#include int main() { char ch; if(ch = printf("")) printf("It matters\n"); else printf("It doesn't matters\n"); return 0; } -
What will be the output of the program?
#include int main() { unsigned int i = 65536; /* Assume 2 byte integer*/ while(i != 0) printf("%d",++i); printf("\n"); return 0; } -
What will be the output of the program?
#include int main() { float a = 0.7; if(0.7 > a) printf("Hi\n"); else printf("Hello\n"); return 0; } -
What will be the output of the program?
#includeint main() { int a=0, b=1, c=3; *((a) ? &b : &a) = a ? b : c; printf("%d, %d, %d\n", a, b, c); return 0; }

Whatsapp
Facebook