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

What is a structure and why it is used?

623


Explain the use of 'auto' keyword in c programming?

685


Explain a file operation in C with an example.

665


How to get string length of given string in c?

611


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

758






What is the use of linkage in c language?

619


What is the use of function in c?

715


What is function in c with example?

635


write a c program for swapping two strings using pointer

2098


What is #include called?

573


program to convert a integer to string in c language'

1988


When we use void main and int main?

591


how many errors in c explain deply

1633


What is the basic structure of c?

561


Can we add pointers together?

622