#include <stdio.h>
#include <string.h>
#include <windows.h>
int main()
{
char str[100] = "HELLO WORLD! GOOD BYE!";
int i,j;
while(1)
{
for(i=0;i<strlen(str);i++)
{
system("cls");
for(j=i;j<strlen(str);j++)
{
printf("%c",str[j]);
}
Sleep(100);
printf("\n");
}
}
return 0;
}
system ( "CLS") is a C language program call the system command cls clear the screen to complete the operation.
system ( "time / t") ; the display time
system ( "dir"); // column directory
system ( "pause"); resident achieved.
system function is a function of the operating system and language provide convergence C, the following function prototype:
#include <stdlib.h> // where header
int system (const char * command) ; // parameters for the operating system commands
Functions Function: execute a shell command execute an operating system command