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
How do you use a pointer to a function?
Explain the properties of union. What is the size of a union variable
Why static is used in c?
What is the usage of the pointer in c?
Why do we use namespace feature?
Is r written in c?
What will the preprocessor do for a program?
How do I convert a string to all upper or lower case?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
If I have a char * variable pointing to the name of a function ..
What is formal argument?
What is maximum size of array in c?
Explain what are bus errors, memory faults, and core dumps?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Under what circumstances does a name clash occur?