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 / sathish

execution does from right to left and while printing it goes from left to right.

Is This Answer Correct ?    18 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is const and volatile in c?

559


Why header file is used in c?

566


What is the difference between ā€˜gā€™ and ā€œgā€ in C?

2493


What is meant by errors and debugging?

639


What are the different file extensions involved when programming in C?

740






What is a char in c?

548


Is python a c language?

547


Is null equal to 0 in sql?

642


What is volatile variable in c with example?

579


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

822


What does %c do in c?

578


What the different types of arrays in c?

606


What is static identifier?

693


How can I change the size of the dynamically allocated array?

624


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1364