Answers for "increment and decrement operators in c++ with examples"

C++
0

how to use decrement operator in c++

#include <iostream>
using namespace std;

int main()
{
  int x = 5, y = 5;
  
  cout << x-- << " " << --y ;
  // Outputs 5 4
  
  return 0;
}
Posted by: Guest on October-19-2021

Code answers related to "increment and decrement operators in c++ with examples"

Browse Popular Code Answers by Language