In Output Based Questions [Pseudo Code]
      Clik To Join Telegram To Stay Updated
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 :
#include <stdio.h>
int main()
{
    float i;
    i = 1;
    printf("%d", i);
    return 0;
}
A. Garbage value
B. 1
C. 1.0
D. Error 
Ans. A
5. What will be the output of following code :
#include <stdio.h>
int main()
{
    int num = 987;
    int rem;
    while (num != 0)
    {
        rem = num % 4;
        num = num / 10;
    }
    printf("%d", rem);
}
A. 1
B. 3
C. 0
D. 2
Ans. A
6. What will be the output of following code :
#include <stdio.h>
int main()
{
    typedef int num;
    num bunk = 0.00;
    printf("%d", bunk);
    return 0;
}
A. 0
B. 0.0
C. Error
D. Garbage Value
Ans. A




 
 
 
 
No comments:
Post a Comment