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
What is structure data type in c?
Explain what are reserved words?
Write a program for Overriding.
Explain what is output redirection?
What is floating point constants?
Is the exit() function same as the return statement? Explain.
When was c language developed?
which is an algorithm for sorting in a growing Lexicographic order
code for find determinent of amatrix
Is c programming hard?
What is meant by operator precedence?
a program that can input number of records and can view it again the record
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)
Is there anything like an ifdef for typedefs?
What is c variable?