top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the name of the “-->” operator in C/C++?

+3 votes
327 views

Here is working code on gcc compiler but I dont know the name of the symbol "--> ."

#include <stdio.h>
int main()
{
    int x = 10;
    while (x --> 0) // x goes to 0
    {
        printf("%d ", x);
    }
}
posted Mar 13, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

The condition mentioned in while "if x is greater than zero then decrease the value of x by 1 and print the value of x".
while (x-- > 0) or while (x -->0) // both are same.

answer Mar 14, 2016 by Vimal Kumar Mishra
Thanks..
...