Well, as for the linux routine I don’t know how to inform, actually I don’t know if there is any native way to do this, because this is something related to the operating system, it’s a specific call where the language has to ask for "authorization" because both work differently.
It is easy to notice the difference between the terminal and the prompt in this question, because in the terminal when we type the "clear" command it actually prints a series of blank spaces and arrow the cursor to the beginning, however if we roll it up we can see clearly what has been done previously.
Already the prompt it actually does a buffer wipe, leaving the screen "new".
To inform a cursor coordinate in Windows, follows an easy function for this:
#include <stdio.h>
#include <windows.h>
void gotoxy( int x, int y )
{
COORD coord;
coord.X = (short)x;
coord.Y = (short)y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
int main()
{
gotoxy(5,5);
printf("Hello");
return 0;
}
In this code we will write the message "Hello" at the X and Y position of the windows prompt.
Now how much the screen cleansza, sorry but I believe only with the system("cls || clear"); to solve even.
Your target platform has what CPU? Something coming up less than 20MHz? On text screen, unless you want to work with a few dozen FPS, it won’t do the right performance to redesign the text screen in C. (And it doesn’t make sense to have a text interface with more than 4 FPS)
– jsbueno