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 do the 'c' and 'v' in argc and argv stand for?
Can you please explain the difference between syntax vs logical error?
Difference between malloc() and calloc() function?
What is register variable in c language?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What is keyword in c?
What is ponter?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
Write a program for finding factorial of a number.
Describe the order of precedence with regards to operators in C.
How do I swap bytes?
What does c mean before a date?
Explain how can I pad a string to a known length?
How can I swap two values without using a temporary?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..