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 are the advantages of external class?
What is the difference between functions abs() and fabs()?
Do you know what are the properties of union in c?
Explain what are its uses in c programming?
What are c identifiers?
Where static variables are stored in c?
How can you find the exact size of a data type in c?
What is the difference between a string and an array?
What is define directive?
Explain 'far' and 'near' pointers in c.
Is a house a mass structure?
Which node is more powerful and can handle local information processing or graphics processing?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What are categories used for in c?
What is the benefit of using const for declaring constants?