Here's a link to get you started reading about C and undefined behavior - why-are-these-constructs-using-pre-and-post-increment-undefined-behavior
Unclear about Order of passing arguments while callng a function in C programming
Anonymous
I want to know the preference order of passing arguments while calling a function in C programming. Actually i am getting different-different answer, so help me out. Here are the two sets of C program.
1-
include<stdio.h>
int main()
{
int a = 1;
printf("%d\t%d\t%d\n", a,++a, a++);
return 0;
}
2-
include<stdio.h>
int main()
{
int a = 1;
printf("%d\t%d\t%d\n", --a,++a, a++);
return 0;
}
3-
include<stdio.h>
int main()
{
int a = 5;
printf("%d\t%d\t%d\n", --a,++a,a--);
return 0;
}
Developer technologies | C++
3,976 questions