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
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What are loops c?
How can you tell whether two strings are the same?
Where are local variables stored in c?
Which is better pointer or array?
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
How can my program discover the complete pathname to the executable from which it was invoked?
What is a union?
Do you know the use of 'auto' keyword?
What is console in c language?
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
Are pointers integers in c?
#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); }
find out largest elemant of diagonalmatrix
Can we initialize extern variable in c?