main()
{
int i=5;
printf("%d%d%d%d",i++,i--,i);
}
Answer Posted / sravankumar
printf() function evaluates from right to left
printf("\n %d %d %d",i++,i--,i);
4 5 5
<- <- <- <- <-evaluation of expression
but prints as the way we mentioned in printf() function
i.e first i = 5
then i--= 5 because it is post decrement
then i++= 4 this because i is decremented in above, and
not incremented immediately because is post
increment
So output is : 4 5 5
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is a macro?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
When should a far pointer be used?
How can a program be made to print the line number where an error occurs?
What are high level languages like C and FORTRAN also known as?
Write a program to check palindrome number in c programming?
What is character set?
Can we increase size of array in c?
What is the difference between procedural and declarative language?
Tell me when would you use a pointer to a function?
Explain can you assign a different address to an array tag?
What is f'n in math?
What is c system32 taskhostw exe?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Write a program to print fibonacci series using recursion?