In C++, we can combine two same/different operators in a single expression.

'-->' is not a single operator. It is a combination of two operators. i.e. Post Decrement operator & Relational operator (Greater than).

For example, consider the statement x-->1.  First, it checks if the x is greater than 1 and then decrement the x by 1.

To remove ambiguity this can be rewritten as x-- > 1 which separates both the operators but the result is the same.

x-- decrements the value of x to 1 (i.e. equivalent to x = x-1 ).


#include <stdio.h>

int main(void) {
  int value = 10;
  while (value --> 0) { // loop runs till value becomes 0
    printf("%d ", x);
  return 0;

To understand more on operators, please refer to the following article

Operators in C
Operators are the symbols, which are used to perform operations on the operands. Operators are always associated with operands.
Operator precedence and order of evaluation
Operator precedence and the order of evaluation plays a major role when two or more operators are used in a statement. for example...