Home > Back-end >  C for the output of the local variable in a function
C for the output of the local variable in a function

Time:11-13

Why is the following output
3 + +
2 --

` ` ` CPP
#include
#include
#include
using namespace std;

Int (f1) {
Static int a=1;
A +=1;
return a;
}

Int main () {
cout
}
` ` `

CodePudding user response:

Expression evaluation order undefined, it is recommended that:
Int x=f1 ();
Int y=f1 ();
Cout,,,,,,,,
  • Related