Q. | What will be output if you will compile and execute the following c code? #include
void call(int,int,int);
int main(){
int a=10;
call(a,a++,++a);
return 0;
}
void call(int x,int y,int z){
printf("%d %d %d",x,y,z);
}
|
|||||||
|
Answer: | Option B | |
Explaination: |
Default parameter passing scheme of c is cdecl i.e. argument of function will pass from right to left direction. First ++a will pass and a=11
Then a++ will pass and a=11
Then a will pass and a=12
|
Discussion
Your Comments Goes here... |
Name | Discussion |
---|