C Programming MCQ

1:

Consider the following program

mani( )
{
 int x = 2, y = 5;
   if (x < y)
   return ( x = x + y);
   else printf ("z1");
   printf ("z2");
}


Choose the correct statements

A.

the output is z2

B.

the output is z1z2

C.

this will result in compilation error

D.

none of above

 

Answer : D

Explanation :

neha.jain@gmail.com said: (8:34pm on Thursday 6th June 2013)
output will be z1z2
Susrutha said: (12:55am on Sunday 22nd April 2018)
It will not print thing because there is return statement in if condition.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.