C - Functions - Discussion

You Are Here :: Home > C > Functions - Discussion

 



Q.

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

Answer: Option D
Explaination:

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



Discussion

Your Comments Goes here...
NameDiscussion