void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / buvaneswari
as already told,the precedence wil be from right to left..
so i++ the value wil be still 5 and incremented value wil be stored in memory..
and next ++i now the value of i=5 not considering the memory value...so ++i =6...now the new value of i is 6.this wil be replaced the value 5 in the memory
u can see the expression as i+i in default or consider to be
i=i++ and i=++i....so i+i(ie)6+6=12....
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Do you know the difference between exit() and _exit() function in c?
Define Spanning-Tree Protocol (STP)
Explain how can I remove the trailing spaces from a string?
Write a program for Overriding.
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is a pointer value and address in c?
What is calloc malloc realloc in c?
What is wild pointer in c?
Can the size of an array be declared at runtime?
What is %s and %d in c?
What is property type c?
Can you explain the four storage classes in C?
What is main () in c language?
Why malloc is faster than calloc?
What is the advantage of c?