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

How can you draw circles in C?

1158


How do you write a program which produces its own source code as output?

1128


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1122


What is pragma in c?

1221


Explain what is wrong with this statement? Myname = ?robin?;

1594


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1309


An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode

1097


How can you increase the size of a statically allocated array?

1088


Where are some collections of useful code fragments and examples?

1166


Do variables need to be initialized?

1064


Which node is more powerful and can handle local information processing or graphics processing?

1331


c language interview questions & answer

1969


Explain the use of 'auto' keyword in c programming?

1125


What is the size of enum in bytes?

1091


What is a wrapper function in c?

1127