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
How do you construct an increment statement or decrement statement in C?
How do we open a binary file in Read/Write mode in C?
a c code by using memory allocation for add ,multiply of sprase matrixes
Write a program to check palindrome number in c programming?
What is a function simple definition?
What are the different types of objects used in c?
How can you draw circles in C?
How many bytes are occupied by near, far and huge pointers (dos)?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Explain what is the difference between a free-standing and a hosted environment?
Explain what is the advantage of a random access file?
Explain what is the difference between far and near ?
define string ?
What is queue in c?