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

Can we increase size of array in c?

964


Discuss the function of conditional operator, size of operator and comma operator with examples.

1158


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1204


What is an identifier?

1032


What is the acronym for ansi?

1047


List the difference between a "copy constructor" and a "assignment operator"?

1012


Are bit fields portable?

1157


can anyone suggest some site name..where i can get some good data structure puzzles???

2082


If I have a char * variable pointing to the name of a function ..

1168


What does it mean when the linker says that _end is undefined?

1094


What is pointer & why it is used?

1111


What is use of integral promotions in c?

1148


What is "Duff's Device"?

1165


hi send me sample aptitude papers of cts?

2164


Can we assign string to char pointer?

1101