Welcome Guest | Sign in | Register
Operators - Discussion Page For Q.10669 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Operators > Questions and Answers

Q: What will the output of following C code?
main()
{
int i=5;
printf("%d",++i++);
}
A. Compiler error B. 5
C. 7 D. 6

Answer and Explanation

Answer:Compiler error

Explanation:
Compiler error: Lvalue required in function main

++i yields an rvalue. For postfix ++ to operate an lvalue is required.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.