main()
{
int i = 10;
printf(" %d %d %d \n", ++i, i++, ++i);
}
Answer Posted / krityangan
The Answer is 13 11 13
because the post increment will printed first and then pre.
i=10
the ++i=11,i++=12,++i=13,but in c the compiler will print ++p which is now 13 and after that when the compiler come to i++ it will print 11 because in the pre addition the previous vale is printed first andthan i= 12.
| Is This Answer Correct ? | 27 Yes | 11 No |
Post New Answer View All Answers
What does printf does?
Does c have circular shift operators?
Define and explain about ! Operator?
What are header files in c?
What is restrict keyword in c?
What are structural members?
What are register variables? What are the advantage of using register variables?
Explain what are run-time errors?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is the difference between fread buffer() and fwrite buffer()?
What is table lookup in c?
How will you find a duplicate number in a array without negating the nos ?
What is optimization in c?
code for quick sort?
What is the best organizational structure?