What will be the output of
x++ + ++x?
Answer Posted / shivu
4
printf or any other expression executes from right. So first
prefix increment. then 2 and assigned to y. and will get add
with the result again, then it will increment.
now the value of x is 3. but the output is 4.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a scope resolution operator in c?
Is the exit() function same as the return statement? Explain.
How do you do dynamic memory allocation in C applications?
Explain the use of #pragma exit?
How do you determine whether to use a stream function or a low-level function?
Differentiate abs() function from fabs() function.
Explain what is the benefit of using const for declaring constants?
What is the use of structure padding in c?
Why is C language being considered a middle level language?
Explain how can I prevent another program from modifying part of a file that I am modifying?
How do c compilers work?
Explain the binary height balanced tree?
How can I use a preprocessorif expression to ?
how to count no of words,characters,lines in a paragraph.
What is extern keyword in c?