20. main()
{
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}
Answer:??????
Answer Posted / ashish
The only concept here is that the printf starts 'generating'
results from RHS to LHS.
Hence, in the process of generation: i=5; then --i=4; ++i=5;
i--=5(due to the postfix concept, but after finishing this
calculation i=4); now i++=4(after performing i++, the value
of 'i' is 5, but for printing, due to the postfix concept,
i=4, the current value of 'i' will be printed).
The printing happens in order from LHS to RHS. Hence these
values are printed as 4 5 5 4 5.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
provide an example of the Group by clause, when would you use this clause
What is operator promotion?
What are local static variables? How can you use them?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
State the difference between realloc and free.
What is p in text message?
What is the total generic pointer type?
program for reversing a selected line word by word when multiple lines are given without using strrev
swap 2 numbers without using third variable?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What do you mean by recursion in c?
What is the general form of #line preprocessor?
What does int main () mean?
Explain About fork()?
What is the maximum no. of arguments that can be given in a command line in C.?