#include<stdio.h> int main() { printf("%x\n", -1<<3); return 0; }
#include<stdio.h> #include<string.h> int main() { printf("%c\n", "abcdefgh"[4]); return 0; }
Hence the output is 'e'.
#include<stdio.h> int main() { union a { int i; char ch[2]; }; union a u; u.ch[0] = 3; u.ch[1] = 2; printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i); return 0; }
So the output is 3, 2, 515.
#include<stdio.h> int main() { int X=40; { int X=20; printf("%d ", X); } printf("%d\n", X); return 0; }
#include<stdio.h> int main() { char c=48; int i, mask=01; for(i=1; i<=5; i++) { printf("%c", c|mask); mask = mask<<1; } return 0; }
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.