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
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What's the best way of making my program efficient?
How many levels of pointers can you have?
What are the 32 keywords in c?
Which one would you prefer - a macro or a function?
What is infinite loop?
What are preprocessor directives in c?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
Can you return null in c?
What are the advantages of union?
How is pointer initialized in c?
Why is c so powerful?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Explain the term printf() and scanf() used in c language?
Why does not c have an exponentiation operator?