clear screen c
Sure! Here's how you can clear the screen in C:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("clear"); // For Linux/Mac
//system("cls"); // For Windows
return 0;
}
This code uses the system
function to execute the appropriate command for clearing the screen. On Linux or Mac, the command is "clear", while on Windows, the command is "cls".