Q:

I created a program in c which print out a statement , then after some second it clear and replace with a new printed statement

The program is interactive.... But after putting scanf it cannot clear the first statement, anyone knows the solution
char firstn[100];
char secondn[100];
printf("\n\bPlease Enter Your First Name:  ");
scanf("%s", &firstn );
fflush(stdout);
Sleep(1234);
printf("\r\bPlease Enter Your Second Name: ");
scanf("%s", &Secondn);

A:

To clear the screen you can use: 
... // Other headers
#include <stdlib.h>

int main{
   ... // Code
   system("clear"); // or system("cls"); on Windows.
   ... // Code
}

And this should work for your purposes. 
If you need to clear a specific line only, you can use ncurses as this Q&A demonstrates. 

