#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 pre-emptive data structure and explain it with example?

3203


Explain pointers in c programming?

626


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

759


what is the height of tree if leaf node is at level 3. please explain

1591


diff between exptected result and requirement?

1592






How can you access memory located at a certain address?

658


How to declare pointer variables?

677


What are the main characteristics of c language describe the structure of ac program?

604


What is structure packing in c?

599


What is the general form of #line preprocessor?

578


What are the types of type specifiers?

616


What is the data segment that is followed by c?

600


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1501


What is C language ?

1520


There seem to be a few missing operators ..

611