0

How to clear screen in C language before the full program is executed.

Likewise in below program i want to print only "INVALID OPTION!", But at a time it also prints Welcome to CCD! Enjoy your INVALID OPTION! This is problem i only want to print INVALID OPTION! For the given program link is below. https://code.sololearn.com/c6D44PfahchP/?ref=app

3rd Nov 2020, 3:15 PM
Harshad Zarkar
Harshad Zarkar - avatar
6 Respostas
+ 4
You can't clear screen here. All you can do is print the first statment only when the condition is true by adding an *if* statment before entering into switch case. P.S. on your pc, you can system() function to make command processor clear the screen for you according to your shell.
3rd Nov 2020, 3:19 PM
Arsenic
Arsenic - avatar
+ 3
Harshad Zarkar you can't even put an *if* statment in your code ?
3rd Nov 2020, 3:30 PM
Arsenic
Arsenic - avatar
+ 1
I put it before your suggestion But can't get it Arsenic
3rd Nov 2020, 3:32 PM
Harshad Zarkar
Harshad Zarkar - avatar
+ 1
ThanksArsenic
3rd Nov 2020, 5:28 PM
Harshad Zarkar
Harshad Zarkar - avatar