Example of using the postfix and prefix : Prefix postfix « Language « C++






Example of using the postfix and prefix

Example of using the postfix and prefix

#include <iostream>

using namespace std; 

int main( void )
{
     int var1 = 0, var2 = 0;

     cout << var1++ << endl;

     cout << ++var2;

     return 0;
}


           
       








Related examples in the same category

1.Effects of prefix and postfix notationEffects of prefix and postfix notation