I am using 'system("clear");' command to clean the output screen yet the last line printed is displayed.I am using Geany text editor using GNU gcc compiler.Please help and tell me clear the whole screen.
I am a college student and doing coding for the first time. Thanks in advance.
printf "\033c"
command. – Jos Aug 07 '14 at 22:54\033c
and\x1Bc
(ESC c) may be terminal specific.system("tput clear")
may be a lot more portable. Seeman 5 terminfo
for more, see alsoman terminfo
for avoiding the overhead of system(). – Hannu Jan 04 '15 at 15:39