Your program so far needs stdio.h, which you'd include at the top of your file like
#include <stdio.h>
As for whether your program does what you think it does, I have no idea what you think it does. Right now it just fills the terminal with "Display this statement in 5 row 5 column in disk every time". What do you mean by 'row 5 column 5 in disk'? What do you mean 'every time'?
#include<stdio.h>
int main ()
{
while(1)
{
printf("\rhi");
}
return 0;
}
The \r character will send the cursor back to the beginning of the line without moving it down. (It doesn't clear the line, either.) If you're being given instructions to go a specific line though, this isn't sufficient, since printf can't go anywhere but across or down. You need to somehow tell the terminal what to do. You do this with ANSI escape sequences, which means printing the ESC character followed by a little bit of data. Here's two simple ones.
#include <stdio.h>
void cls(void) // clear screen
{ printf("\033[2J"); }
void gotoxy(int x, int y) // go to coordinates
{ printf("\033[%d;%dH", y, x); }
int main(void)
{
cls();
gotoxy(50,5);
printf("hi\n");
}
This isn't guaranteed to work in all terminals in all circumstances. (I can't think of a modern UNIX terminal it won't work in, but Windows certainly won't like it.)