Like all things in conio.h . clrscr() has nothing to do with the C. conio standard - this is a common API of ancient C DOS implementations for lower-level consoles - such as clearing the screen, moving the cursor, reading individual keystrokes, etc. I donβt know the story, but presumably this dates before DOS has ANSI.SYS for supporting standard terminal exit codes for positioning the cursor, clearing the screen, changing colors, ...
If you just play the C learning process, there is no harm in using the conio functions, but you should avoid the #include <conio.h> habit. In most of the questions I saw on SO where conio.h was included, it wasnβt even used ... Such a bad habit leads to pointlessly intolerable code.
R ..
source share