The Increment and Decrement Operators - C++ Operator

C++ examples for Operator:Increment and decrement operators

Description

The Increment and Decrement Operators

Demo Code

#include <iostream> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        int value = 0; 
        cout << value << endl; 
        cout << value++ << endl; 
        cout << ++value << endl; 
        cout << value-- << endl; 
        cout << --value << endl; 
        return 0; 
}

Result


Related Tutorials