#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
What is pre-emptive data structure and explain it with example?
Explain pointers in c programming?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
what is the height of tree if leaf node is at level 3. please explain
diff between exptected result and requirement?
How can you access memory located at a certain address?
How to declare pointer variables?
What are the main characteristics of c language describe the structure of ac program?
What is structure packing in c?
What is the general form of #line preprocessor?
What are the types of type specifiers?
What is the data segment that is followed by c?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What is C language ?
There seem to be a few missing operators ..