main()
{ int i;
printf("%d",((i=1)*i-- - --i*(i=-3)*i++ + ++i));
}
ans is 24 bt how?pls tell smbody............
Answer Posted / sureshb
value is 26 and i value is -2.
Intiallay i=1 is assiged.
((i=1)*i--) 1st expression = 1 postfix decrement evaluates at the end.
now i=1
--i => 0. 2nd expression
i=-3 assigned new value 3rd expression.
-3*-3 => 9 *(-3) => -27
++ post increment done at the end
-(-27) = 27.
1+ 27 =>28
now i is -3.
++i => -2;
28-2= 26.
i=-2;
post increment and decrement happens. finaaly i = -2.
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Explain what is the benefit of using an enum rather than a #define constant?
how to count no of words,characters,lines in a paragraph.
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What does c mean?
Explain 'bit masking'?
What is an expression?
Is c is a high level language?
How is pointer initialized in c?
What are header files why are they important?
How can I do serial ("comm") port I/O?
Is javascript based on c?
Explain spaghetti programming?
Why is c called c not d or e?
Tell me with an example the self-referential structure?
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this