main()
{
int i = 10;
printf(" %d %d %d \n", ++i, i++, ++i);
}
Answer Posted / dr. sanyasi naidu pasala
13 11 11
First the value of i was assigned to right most variable ++i. In this first i value which is 10 will be incremented to 11, then assigned to i and printed as 11. Then that 11 is passed to the middle variable which is i++. In this first the value 11 is assigned to i, print the value of i as 11 and then incremented to 12. This 12 is now passed to left most variable ++i. In this the value 12 is first incremented to 13 then assigned to i and print as 13. Even though generally the evaluation will be taken place from right most variable to left most variable, the evaluation process may vary from operating system to operating system.
Is This Answer Correct ? | 27 Yes | 11 No |
Post New Answer View All Answers
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
formula to convert 2500mmh2o into m3/hr
How does pointer work in c?
How do you view the path?
Explain a pre-processor and its advantages.
What are local static variables? How can you use them?
Why do we use main function?
What is difference between constant pointer and constant variable?
What is a pointer and how it is initialized?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
Hi can anyone tell what is a start up code?
What are the two forms of #include directive?
What is use of bit field?
What do you mean by dynamic memory allocation in c? What functions are used?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions