Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the use of getch() function in C program..
difference b/w getch() and getche()??

Answer Posted / yashwant/9015785079

When you will run program, the program will exit only when you press a character, note that we are talking about a character.
so try pressing numlock, shift key etc (program will not exit if you press these keys) as these are not characters. Also try the program by removing getch(),in this case program will exit without waiting for a character being pressed from keyboard.
Common use of getch is that you can view the output (if any) of your program without having to open the output window if you are using turbo c compiler or if you are not running your program from command prompt.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain high-order and low-order bytes.

1052


Why does not c have an exponentiation operator?

1000


What is advantage of pointer in c?

1127


What is the use of ?: Operator?

1082


What is c variable?

1000


How many levels of pointers have?

991


Explain what is operator promotion?

1028


Explain how do you list files in a directory?

1019


What is difference between constant pointer and constant variable?

1205


What is variable and explain rules to declare variable in c?

1020


What’s a signal? Explain what do I use signals for?

1059


How to compare array with pointer in c?

1055


Why pointers are used?

1026


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1926


How can I generate floating-point random numbers?

1048