|
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);
}
a.prints 1111
b.compilation error
c.prints 0
d.is not a valid option
ans:c
22. struct {
int len;
char *str
}*p;
++p -> len
a.increments p
b. increments len
c.compilation error
d.nothing happens with either of p and len
ans:b
23. int i=10;
a.declaration
b.definition
c.both
|
|