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
What is a structure and why it is used?
Explain the use of 'auto' keyword in c programming?
Explain a file operation in C with an example.
How to get string length of given string in c?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
What is the use of linkage in c language?
What is the use of function in c?
What is function in c with example?
write a c program for swapping two strings using pointer
What is #include called?
program to convert a integer to string in c language'
When we use void main and int main?
how many errors in c explain deply
What is the basic structure of c?
Can we add pointers together?