What is conio.h and why do we use?

By | February 21, 2024

The word conio.h stands for console input-output and in programming, console means output window which is the window where the result of the execution of our program is displayed.

This console window is automatically produced by our operating system and has some default settings.

‘conio.h’ is a header file used in C and C++. Most people don’t use it because it was used in older compilers such as Turbo C. Also note that conio.h is not part of the standard C library and the GCC compiler does not support it.

The header file conio.h provides use some very important function that helps us to manage this setting some of the important functions are given by the header file conio.h are-

  1. clrscr(); used for clearing the window of the console.
  2. color(); used for changing the font color of the console window.
  3. getch(); used for pushing the console window.
  4. gotoxy(); used for setting cursor position on the console window.

Please write comments if you find anything incorrect. A gentle request to share this topic on your social media profile.