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 / minchoo
answer is 2 2 1 and not 3 3 1
| Is This Answer Correct ? | 4 Yes | 43 No |
Post New Answer View All Answers
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Why do we use main function?
What is the size of enum in bytes?
What is the mean of function?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What is the difference between void main and main in c?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
What does node * mean?
What is the difference between array and pointer in c?
How can I sort a linked list?
What is s in c?
What is the total generic pointer type?
Between macros and functions,which is better to use and why?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
Write a program to print factorial of given number without using recursion?