#include <stdio.h>
#include <string.h>
#include <unistd.h> // for usleep()
int main() {
const int width = 50;
for (int x = 0; x < width; x++) {
printf("\r%*c", x, '@'); // print x spaces then '@'
fflush(stdout);
usleep(80000); // 80 ms
}
printf("\n");
return 0;
}
/*
run:
@
*/