#include<stdio.h>
main()
{ int i=5;
printf("%d",i*i-- - --i*i*i++ + ++i);
}
tell the answer with correct reason .specially reason is
important nt answer
ans by turbo c is -39
Answer / myname
It it not an easy question.
After investigating it a little bit, I would say:
- It is undefined behaviour, since "i" is being modified more than once between two sequence points.
- I bet that the turbo c answer is not -39, but -34 (5*5 - 4*4*4 + 5) = -34 (not important, anyway, since any other compiler can reorder the operations and give you any other result since, as I have previously said, it is undefined behaviour).
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of getchar functions?
Is exit(status) truly equivalent to returning the same status from main?
Explain how can you avoid including a header more than once?
How can I trap or ignore keyboard interrupts like control-c?
Is c++ based on c?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
If fflush wont work, what can I use to flush input?
Explain what a Binary Search Tree is.
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
why we shiuld use main keyword in C
How many main () function we can have in a project?
how to find your architecture is LittleEndian or BigEndian?