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 / shivani

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() is not waiting to press enter to show output on
screen.
but getchar() is waiting to press enter to show output.

Is This Answer Correct ?    9 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum length of an identifier?

1184


What is default value of global variable in c?

992


What is bubble sort in c?

1051


What is the difference between exit() and _exit() function?

1045


What is 1d array in c?

1091


What is the difference between char array and char pointer?

1054


What are run-time errors?

1118


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1199


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1377


diff between exptected result and requirement?

2054


Tell me what is the purpose of 'register' keyword in c language?

1008


What is a buffer in c?

1000


What is int main () in c?

1085


all c language question

2437


Once I have used freopen, how can I get the original stdout (or stdin) back?

1075