0
Q:

getch()

getch() is a nonstandard function and is present in conio.h header file which is mostly used by MS-DOS compilers like Turbo C. It is not part of the C standard library or ISO C, nor is it defined by POSIX.

Like these functions, getch() also reads a single character from the keyboard. But it does not use any buffer, so the entered character is immediately returned without waiting for the enter key.

Syntax:

int getch(void);
Parameters: This method does not accept any parameters.

Return value: This method returns the ASCII value of the key pressed.getch() is a nonstandard function and is present in conio.h header file which is mostly used by MS-DOS compilers like Turbo C. It is not part of the C standard library or ISO C, nor is it defined by POSIX.

Like these functions, getch() also reads a single character from the keyboard. But it does not use any buffer, so the entered character is immediately returned without waiting for the enter key.

Syntax:

int getch(void);
Parameters: This method does not accept any parameters.

Return value: This method returns the ASCII value of the key pressed.
0

New to Communities?

Join the community