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
What are control structures? What are the different types?
What is FIFO?
What is the difference between test design and test case design?
Why array is used in c?
How do I determine whether a character is numeric, alphabetic, and so on?
What is extern variable in c with example?
What is the difference between text files and binary files?
Why calloc is better than malloc?
How can you tell whether a program was compiled using c versus c++?
What are structure members?
What is the use of f in c?
What are local static variables? How can you use them?
How can I read in an object file and jump to locations in it?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
If I have a char * variable pointing to the name of a function ..