Well, as for the routine for linux I do not know to inform, in fact I do not know if there is any native way to do this, since this is something referring to the operating system, it is a specific call in which the language has to ask for "authorization" because they both work differently.
It is easy to see the difference between the terminal and the prompt in this question, because in terminal when typing the command "clear" it actually printa a series of blanks and arrow the cursor to the beginning, however if we roll we can see clearly what was done previously.
At the prompt, it actually cleans the buffer, leaving the screen "new."
To inform a cursor coordinate in Windows, an easy function follows 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" in position X and Y of the windows prompt.
Now how much the cleanness of the screen, I'm sorry but I believe that only with the system ("cls || clear"); to solve even.