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
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
Can a local variable be volatile in c?
how many errors in c explain deply
What is structure and union in c?
Is it better to bitshift a value than to multiply by 2?
Not all reserved words are written in lowercase. TRUE or FALSE?
What do you mean by dynamic memory allocation in c? What functions are used?
When can you use a pointer with a function?
What is the best way to store flag values in a program?
Which built-in library function can be used to match a patter from the string?
Does c have function or method?
What is the description for syntax errors?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.