What will be the output of
x++ + ++x?
Answer Posted / prem
if x=3
y=x++ + ++x;
y will be 8
x will be 5
calculating y part
1) x++ is 3 and x will be 4
2)++x is 5 bcz x is incremented then assigned so x=5
so y finally gives 8.
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is calloc()?
What are the three constants used in c?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
Explain what is the difference between the expression '++a' and 'a++'?
Whats s or c mean?
In c language can we compile a program without main() function?
What is an lvalue?
I need a sort of an approximate strcmp routine?
When is a null pointer used?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Why & is used in c?
why return type of main is not necessary in linux
Is there a way to jump out of a function or functions?
What is array of pointers to string?
Are there any problems with performing mathematical operations on different variable types?