#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


Please Help Members By Posting Answers For Below Questions

What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

816


What is the use of function overloading in C?

686


What is a scope resolution operator in c?

754


What is the use of typedef in c?

593


Can the “if” function be used in comparing strings?

599






Explain how do you determine a file’s attributes?

596


What is c programming structure?

623


What is the meaning of ?

624


Can we declare function inside main?

572


Which type of language is c?

656


What is the meaning of && in c?

552


What is action and transformation in spark?

600


what is the significance of static storage class specifier?

1667


Why #include is used in c language?

605


When should volatile modifier be used?

558