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 are predefined functions in c?
What are operators in c?
What does it mean when the linker says that _end is undefined?
what is the difference between 123 and 0123 in c?
What is the use of sizeof?
Write a program to swap two numbers without using third variable?
Is c is a middle level language?
In a header file whether functions are declared or defined?
What are the differences between new and malloc in C?
Who is the main contributor in designing the c language after dennis ritchie?
Why does this code crash?
Are pointers really faster than arrays?
What is scanf () in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What does %d do in c?