1. #include “stdio.h” int main() { int i; for (i = 9; i!=0; i–) printf(“i = %d”, i–); return 0; } (a) 9 7 5 3 1 (b) 9 8 7 6 5 4 3 2 1 (c) Infinite Loop
Decision Control in C
1. Find output of the following program #include “stdio.h” int main() { int i; if (printf(“0”)) i = 4; else i = 6; printf(“%d”, i); return 0; } (a) 4 (b) 6 (c) 04 (d) 06 2. Find output of
Operators in C
1. Find output of the following program #include “stdio.h” int main() { int x, y = 5, z = 5; x = y == z; printf(“%d”, x); getchar(); return 0; } (a) Compiler Error (b) 0 (c) 1 (d) 8