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 string constants?
What is d scanf?
Why do we use null pointer?
What are the types of macro formats?
What is the difference between declaring a variable and defining a variable?
How do you print an address?
Is it valid to address one element beyond the end of an array?
What is a stream water?
What are the string functions? List some string functions available in c.
What is the use of typedef in c?
Can a variable be both const and volatile?
What are # preprocessor operator in c?
Why is not a pointer null after calling free?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
Write a program to swap two numbers without using a temporary variable?