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
When is the “void” keyword used in a function?
what do you mean by inline function in C?
What is the scope of an external variable in c?
What is the difference between formatted&unformatted i/o functions?
Explain the use of 'auto' keyword
What are the restrictions of a modulus operator?
Are the variables argc and argv are always local to main?
What is structure data type in c?
Is there any demerits of using pointer?
Compare array data type to pointer data type
What functions are in conio h?
What is the meaning of ?
What is break statement?
What is static and auto variables in c?
What are external variables in c?