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 / hemanth
All,
output of above code is compiler depended i.e the order of
evalulation.
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
How can a process change an environment variable in its caller?
write a program fibonacci series and palindrome program in c
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
How to Throw some light on the splay trees?
In a switch statement, explain what will happen if a break statement is omitted?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Explain the difference between #include "..." And #include <...> In c?
will u please send me the placement papers to my mail???????????????????
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is nested structure in c?
What is build process in c?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
Explain the process of converting a Tree into a Binary Tree.
Why main is used in c?