<p>How would I print a spinning curser in a utility that runs in a terminal using standard C?</p>

<p>I'm looking for something that prints: \ | / - over and over in the same position on the screen?</p>

<p>Thanks </p>

You could use the backspace character (
```
\b
```
) like this:
```
```
printf("processing... |");
fflush(stdout);
// do something
printf("\b/");
fflush(stdout);
// do some more
printf("\b-");
fflush(stdout);
```
```
etc. You need the
```
fflush(stdout)
```
because normally stdout is buffered until you output a newline.