Can you explain how the output is: 9 ?Code:#include <iostream> using namespace std; #define SQR(x) ((x) * (x)) int main() { int num=1; cout << SQR(++num) << endl ; return 0; }
I could have thought it would be 1 or if num is incremented by 1 then 4 but how is it 9?



LinkBack URL
About LinkBacks


