In Output Based Questions [Pseudo Code]
1. What will be the output of following code :
#include<stdio.h>int main(){int go = 5.0, num = 1*10;do{num /= go;} while(go--);printf ("%d\n", num);return 0;}
A. Floating Point Exception
B. 3 6 7
C. Compile Error
D. Runtime Error
Ans. A
2. What will be the output of following code :
#include <stdio.h>int main(){float x = 0.0;long int y = 10;printf("%d", sizeof(y) == sizeof(x + y));return 0;}
A. 4
B. 1
C. 8
D. 0
Ans. D
3. What will be the output of following code :
#include <stdio.h>int main(){int any = ' ' * 10;printf("%d", any);return 0;}
A. 320
B. 380
C. 390
D. 400
Ans. A
4. What will be the output of following code :
A. Garbage value
B. 1
C. 1.0
D. Error
Ans. A
5. What will be the output of following code :
A. 1
B. 3
C. 0
D. 2
Ans. A
6. What will be the output of following code :
A. 0
B. 0.0
C. Error
D. Garbage Value
Ans. A