Slideshow

Monday, 25 February 2013





Q.1 What is the output of the following program?
main ( )
{ int x = 2, y = 5;
if (x < y) return (x = x+y); else printf (“z1”);
printf(“z2”);
}
(A) z2 (B) z1z2
(C) Compilation error (D) None of these

Ans: D
There is no compilation error but there will no output because function is returning a
value and if statement is true in this case.




No comments:

Post a Comment