These changes to the position of the operator with respect to the operands create two new expression formats, prefix and postfix.

++x;// prefix

x++;// postfix

Prefix increments the value, and then proceeds with the expression.
Postfix evaluates the expression and then performs the incrementing

Prefix:

New Project (7)

The Output of Your Code:

New Project (10).png

Postfix:

New Project (9)

The Output of Your Code:

New Project (10)

if_Audio_-_Video_-_Game_26_2298369 (1)    if_Audio_-_Video_-_Game_27_2298366 (1)

 

 

Leave a comment