1.

What is the output of the program? int add (int x); void main( ) { int y;  y=add(3);  clrscr();  printf("%d",y); } add(int x){ return (x--); } a) 4 b) 3 c) 2 d) error 

Answer»

Correct option: b) 3

Reason: The return st.. returns x value first as it is and then decrements its value. Its post decrement.



Discussion

No Comment Found

Related InterviewSolutions