void main()
{
int a=1;
printf("%d %d %d",a,++a,a++);
}
the output is supposed to be 1 2 2....but it is 3 3 1
this is due to calling conventions of C. if anyone can
explain me how it happens?
Answer Posted / hemanth
All,
output of above code is compiler depended i.e the order of
evalulation.
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
What is || operator and how does it function in a program?
find out largest elemant of diagonalmatrix
How many bytes are occupied by near, far and huge pointers (dos)?
What does the error 'Null Pointer Assignment' mean and what causes this error?
Differentiate between functions getch() and getche().
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
How reliable are floating-point comparisons?
When should we use pointers in a c program?
Can we replace the struct function in tree syntax with a union?
What are the difference between a free-standing and a hosted environment?
What do you understand by normalization of pointers?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is the sizeof () operator?
What are the 5 elements of structure?
Why do we use null pointer?