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
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is .obj file in c?
What is a function simple definition?
What is a lookup table in c?
how to find binary of number?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
How can I change the size of the dynamically allocated array?
In a header file whether functions are declared or defined?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Is c procedural or functional?
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What is realloc in c?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
Can we declare function inside main?