i have a loop displaying current number of file which is being created.

     printf("%d. file has been created\n",i);

but i dont want the display to write ". file has been created." again and again as a list. I want only the i change. how can i do that?


You could try

printf("%d. file has been created\r",i);

Note the \r (carriage return), which should return you to the start of the current line, whereas \n is newline.