Answers for "increment and decrement 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
-1

decrement c++

int x = 5;
x--;
cout << x << endl;
//outputs 4
Posted by: Guest on December-12-2020

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

Browse Popular Code Answers by Language