0
1st 2 time a value is increment then return, but why show output 23? Any tricks inside here?
Int main(){ Int a=1; Printf("%d",++a); Func(); Printf("%d",++a); Return 0; } Void main(){ Int a= 10; Return 1; }
1 Antwort
+ 1
Your code have errors lot.. Look again..
First printf prints ++a value which is 2,and now a = 2
Next printf prints in same way as 3, now a = 3 so output is 23.
May you mean corrected code is :
1st 2 time a value is increment then return, but why show output 23? Any tricks inside here?
int main(){
int a=1;
Printf("%d",++a);
Func();
printf("%d",++a);
return 0;
}
void Func(){
intt a= 10;
}
This function Func has no effect on code..