gotoxy(), clrscr(), getch() and getche() functions for GCC Linux.
gotoxy(), clrscr(), getche() and getch() in GCC Linux:
In this section you will learn how gotoxy(), getche(), getch() and clrscr() function can be used in GCC Linux. In TurboC compiler you can use that functions by including conio.h header file, but in Linux library these function are not available, so we are providing the function definitions for GCC linux just use them into your program and call where they needed.
gotoxy() for GCC Linux:
gotoxy() move the cursor at specified location in the output screen.
Consider the example:
Output:
clrscr() for GCC Linux:
We can implement clrscr() by using clear command of the linux terminal, It is used to Clear Output Screen.
Consider the example:
Output:
getch() and getche() for GCC Linux:
getch() function is used to get (read) single character from standard input device (keyboard) without echoing i.e. it does not display the input character & it does not require [return] key after input. getch() is declared in conio.h header file.
getche() function is used to get (read) single character from standard input device (keyboard) with echoing i.e. it displays the input character & it does not require [return] key after input. getche() is declared in conio.h header file.
Consider the example:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer