I have created two functions and return the value to main part.
#include <iostream>
using namespace std;
int a =8;
int g(){a++; return a-1;}
int f(){a++; return a;}
int main (){
cout << g()+f()<<endl;
return 0;
}
I don't why the output would be 18 but not 17. I was wondering if anyone can explain this in detail for me? Thanks for your help