Sobes.tech
Junior — Senior

What output will the program with postfix and prefix increment produce

livecode

Task condition

Determine what value will be output to the console after executing the following code.

int counter = 0;

if (counter) ++counter; counter++;

if (counter) ++counter; counter++;

cout << counter++ << endl;