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 difference between getch() and getchar()?

Answer Posted / pinky

getchar() is a function call: it reads in a single
character and waits for the user to hit 'enter key' before
reading the character. This line is included because many
compiler environments will open a new console window, run
the program, and then close the window before you can see
the output. This command keeps that window from closing
because the program is not done yet because it waits for
you to hit enter. Including that line gives you time to see
the program run.

getch() returns back on reading any character(a-z) or any
hit to the keyboard.

Is This Answer Correct ?    34 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

the question is that what you have been doing all these periods (one year gap)

2140


How many bytes is a struct in c?

1213


What is the size of structure in c?

1214


How can I read in an object file and jump to locations in it?

1070


How reliable are floating-point comparisons?

1149


What is calloc()?

1131


What is operator precedence?

1280


What is register variable in c language?

1062


When should volatile modifier be used?

1071


Explain what is operator promotion?

1147


How do I read the arrow keys? What about function keys?

1145


How can I change the size of the dynamically allocated array?

1205


What is the purpose of sprintf() function?

1181


What is masking?

1213


How will you delete a node in DLL?

1338