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


Please Help Members By Posting Answers For Below Questions

How can you allocate arrays or structures bigger than 64K?

683


What type of function is main ()?

586


How will you declare an array of three function pointers where each function receives two ints and returns a float?

781


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

632


to find the closest pair

1823






Can a variable be both const and volatile?

676


How many types of operators are there in c?

615


What are the types of unary operators?

662


Explain what is the concatenation operator?

628


Explain data types & how many data types supported by c?

586


What's the best way of making my program efficient?

627


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

678


Can we declare function inside main?

569


Explain how do you generate random numbers in c?

626


hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..

1467