Home > UGC NET > Page 2
Q 11.

int x = 10;

int main()
{
int x = 0;
printf(“%d”,x);
return 0;
}

A)  10
B)  0
C)  Compilation Error
D)  Undefined
Q 12.

main()
{
int x = 10;
{
int x = 0;
printf(“%d”,x);
}
}

A)  10
B)  Compilation Error
C)  0
D)  Undefined
Q 13.

Is the following statement a declaration or definition

extern int i;

A)  Declaration
B)  Definition
C) 
D) 
Q 14.

int main()
{
extern int i;
i = 20;
printf(“%d”, sizeof(i));
return 0;
}

 

A)  20
B)  0
C)  Undefined reference to i
D)  Linking Error
Q 15.

Is it true that a function may have several declaration, but only one definition ?

A)  True
B)  False
C) 
D) 
Q 16.

What is sizeof() in C ?

A)  Operator
B)  Function
C)  Macro
D)  None of these
Q 17.

How many main() function we can have in our project ?

A)  1
B)  2
C)  No Limit
D)  Depends on Compiler
Q 18.

Is it possible to run program without main() function?

A)  Yes
B)  No
C) 
D) 
Q 19.

x-=y+1; means

A)  x=x-y+1
B)  x=-x-y-1
C)  x=-x+y+1
D)  x=x-y-1
Q 20.

If we arrange the operators ., ||, <, =, in an ascending order of precedence, which of the following is the correct choice ?

A)  ., ||, <, =
B)  =, <, ||, .
C)  =, ||, <, .
D)  <, ||, =, .