#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 the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is the use of function overloading in C?
What is a scope resolution operator in c?
What is the use of typedef in c?
Can the “if” function be used in comparing strings?
Explain how do you determine a file’s attributes?
What is c programming structure?
What is the meaning of ?
Can we declare function inside main?
Which type of language is c?
What is the meaning of && in c?
What is action and transformation in spark?
what is the significance of static storage class specifier?
Why #include is used in c language?
When should volatile modifier be used?