|
a) compilation error, b) runs fine, c) runtime error, d) none
of these
ANS:b
18. #include<stdio.h>
void main(int argc)
{
int d=1234.5678;
printf("%d",d);
}
a) error, b) 1234.5678, c) 1234, d) 1235
ANS:c
19. #include<stdio.h>
void main(int argc)
{
int a[]={5,6};
printf("%d",a[1.6]);
}
a) 5, b) runtime error, c) compilation error, d) 6
ANS:d
20. #include<stdio.h>
struct x
{
int i=0; /*line A*/
};
void main(int argc)
{
struct x y; /*line B*/
}
a) error due to B,
b) no problem with option A and B,
c) error somewhere other than line A and B,
d) error due to line A
ANS:d
21. #include<stdio.h>
void main(int arg c)
{
int x=1111;
printf("%d",!x);
|
|