#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 Posted / 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 |
Post New Answer View All Answers
Differentiate between full, complete & perfect binary trees.
How to create struct variables?
When should volatile modifier be used?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
Explain how does free() know explain how much memory to release?
What is #line in c?
Explain what are compound statements?
What oops means?
How many types of operator or there in c?
What is c token?
What is header file in c?
what is the syallabus of computer science students in group- 1?
What are the advantage of c language?
What is function pointer c?
Explain why c is faster than c++?