Answers for "comparison operators c++"

C++
0

three way comparison operator c++

//Since C++20
	lhs <=> rhs  
The expression returns an object that
- compares <0 if lhs < rhs
- compares >0 if lhs > rhs
- compares ==0 if lhs and rhs are equal/equivalent.
Posted by: Guest on April-30-2021
-2

x += c++

int main ()
{
  int a, b=3;
  a = b;
  a+=2;             // equivalent to a=a+2
  cout << a;
}
Posted by: Guest on September-29-2020

Browse Popular Code Answers by Language