answersLogoWhite

0


Best Answer

getch is used for console applications and it's very useful because in a way how windows work when a console application has finished it's part windows closes it automatically with the code 0 meaning that program did not have any problems while was running. To prevent automatic shutdown for console applications getch can be used. So, when your program has finished all operations it will wait for an input (basically you will have to press any key to finish the application) from the user.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use getch function in c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What use getch function in c language?

Gets one character (or keystroke) without buffering or echoing; beware: getch is not part of the standard library.


What is the use of getch in C programming?

We use getch() function to hold the screen so that we can see the output but in real it is use to take a input of a character from the console window. Read this out -


How do you read a character from the keyboard and will store it in the variable?

Use the scanf() function from the C standard library.


Is that any other way to input data in c language other than scanf function?

read, fread, gets, fgets, getc, fgetc, getchar, getch


How do you install curses header file in fedora Linux in order to use getch function in a c an c plus plus program?

dnf install ncurses-devel


What is the use of using C programming?

We use getch() function to hold the screen so that we can see the output but in real it is use to take a input of a character from the console window. Read this out -


Defult function in c language is?

Default functions are pre defined functions.Eg. printf();scanf();getch();clrscr();etc..Actually, no-one uses the term 'default function'. (Let alone 'defult function'.)Another answer: Perhaps it is 'main' what you meant.


Why you use 'integer' before function in C language?

To specify the return-type of the function.


What function is used to perform exponentiation in C language?

You can use the pow() function in math.h.


What is the function of getche in programming c?

Function getche is Borland-specific function declared in conio.h, it does the some thing as getch, but echoes the character on the screen.


Is there any keyword in c or c plus plus like the function inkey in qbasic?

Using TurboC? kbhit and getch are your friends


Which function enables you to receive a single character input?

In C you can use following functions - 1. getch() 2. getche() 3. scanf("%c",&ch); getch() just receives the inputs and does not shows the character no need to press enter after the character. getche() is same as getch() but it shows the character. scanf() with format specifier %c can be used to receive a character input. Enter key should be pressed after the character