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
What is a macro?
I have a varargs function which accepts a float parameter?
Is multithreading possible in c?
Why does notstrcat(string, "!");Work?
please give me some tips for the placement in the TCS.
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
What is pass by reference in c?
Can you please explain the difference between malloc() and calloc() function?
What are c preprocessors?
What is the meaning of && in c?
What is the default value of local and global variables in c?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
Explain about C function prototype?
What is variables in c?
Explain how do I determine whether a character is numeric, alphabetic, and so on?