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
How many data structures are there in c?
What is cohesion and coupling in c?
Explain what is the difference between far and near ?
Can static variables be declared in a header file?
Write a program to generate the Fibinocci Series
What is the use of sizeof () in c?
Explain the Difference between the New and Malloc keyword.
Can stdout be forced to print somewhere other than the screen?
What is structure padding and packing in c?
How to declare pointer variables?
What are identifiers in c?
What is variable and explain rules to declare variable in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Describe wild pointers in c?
In C language what is a 'dangling pointer'?