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 / vishnu
first calculations will be done from right to left and then
prints accroding to the parameters passed.
| Is This Answer Correct ? | 29 Yes | 8 No |
Post New Answer View All Answers
What is difference between stdio h and conio h?
What are global variables?
Explain what is gets() function?
Is printf a keyword?
Are comments included during the compilation stage and placed in the EXE file as well?
Is c procedural or object oriented?
What does %c mean in c?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
how many errors in c explain deply
Explain zero based addressing.
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
How can I invoke another program or command and trap its output?
What is c++ used for today?
What are keywords c?
write a program to find out prime number using sieve case?