20. main()
{
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
}
Answer:??????
Answers were Sorted based on User's Feedback
Answer / 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 |
What does static mean in c?
Why we write conio h in c?
How do you list a file’s date and time?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
State two uses of pointers in C?
what will be the output of this program main() { int i=1; while (i<=10); { i++; } }
What is volatile variable in c with example?
What is 1d array in c?
1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision
What is the hardest programming language?
program to locate string with in a string with using strstr function
What is hungarian notation? Is it worthwhile?