main()
{
int i = 10;
printf(" %d %d %d \n", ++i, i++, ++i);
}

Answer Posted / krityangan

The Answer is 13 11 13
because the post increment will printed first and then pre.
i=10
the ++i=11,i++=12,++i=13,but in c the compiler will print ++p which is now 13 and after that when the compiler come to i++ it will print 11 because in the pre addition the previous vale is printed first andthan i= 12.

Is This Answer Correct ?    27 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure data type in c?

575


Explain what are reserved words?

639


Write a program for Overriding.

692


Explain what is output redirection?

670


What is floating point constants?

695






Is the exit() function same as the return statement? Explain.

668


When was c language developed?

706


which is an algorithm for sorting in a growing Lexicographic order

1403


code for find determinent of amatrix

1521


Is c programming hard?

580


What is meant by operator precedence?

680


a program that can input number of records and can view it again the record

1488


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1868


Is there anything like an ifdef for typedefs?

708


What is c variable?

556