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

illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1572


What are loops c?

604


How can you tell whether two strings are the same?

817


Where are local variables stored in c?

560


Which is better pointer or array?

587






c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

602


How can my program discover the complete pathname to the executable from which it was invoked?

650


What is a union?

601


Do you know the use of 'auto' keyword?

648


What is console in c language?

597


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

717


Are pointers integers in c?

598


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

704


find out largest elemant of diagonalmatrix

1637


Can we initialize extern variable in c?

624