How do you clear the console screen in C?
Well, C doesn’t understand the concept of screen. So any code would fail to be portable. Maybe take a look at conio.h or curses, according to your needs? Portability is an issue, no matter what library is used.