Tuesday 26 March 2013

for (;i++=0;) printf(“%d”,i);


    main()
{
int i = 3;
for (;i++=0;) printf(“%d”,i);
}

Answer:
         Compiler Error: Lvalue required.
Explanation:
As we know that increment operators return rvalues and  hence it cannot appear on the left hand side of an assignment operation.

Blog Author: Vijay Kumar

No comments:

Post a Comment