Operator -->

A short C program where x --> 0 quietly counts its way to zero. Behold the goes-to operator.

#include <stdlib.h>

int
main (int argc, char **argv)
{
  int x = 10;

  while (x --> 0)
    printf("%d\n", x);

  return 0;
}

Subscribe to A garage sale for your mind

Don’t miss out on the latest posts. Sign up now to get access to the library of members-only posts.
[email protected]
Subscribe