How to clear the screen in C language

http‮‬s://www.lautturi.com
How to clear the screen in C language

Call the system command using the "system" function :

Cls - Clear the screen. windows
Clear - Clears the screen. linux

/*
Example: clear screen in C language
*/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <stdbool.h>

int main(int argc, char *argv[]) {

    system("clear"); //Linux / Unix
    system("cls"); //windows

    return 0;
}
Created Time:2017-08-28 14:43:35  Author:lautturi