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()?

Answers were Sorted based on User's Feedback



what is the difference between getch() and getchar()?..

Answer / nishi

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 ?    92 Yes 46 No

what is the difference between getch() and getchar()?..

Answer / shruti

@Nishi
the answer you have posted is wrong..

Getch() and getchar() are two inbuilt functions..

in getch()
the argument to the function is any key on the keyboard,
not necessarily be a character (A - Z).

getchar()
the argument is a character -> alphabet (A - Z)..

Is This Answer Correct ?    76 Yes 43 No

what is the difference between getch() and getchar()?..

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

what is the difference between getch() and getchar()?..

Answer / non linearly

getch()
1. Does not echo
2. procces immediatly the typed character

Is This Answer Correct ?    18 Yes 6 No

what is the difference between getch() and getchar()?..

Answer / m@ht@b ahm@d

getchar():- this function returns a character that has been recently typed. the typed character is echoed to the computer screen. after typing the appropriate character the user is required to press enter.

getch():- This function also returns a character that has been recently typed, bet neither the user is required to press enter key after entering the character nor the typed character echoed to the computer screen.

getche():- the advantage of this function over getchar() is that as soon as the user types a character, the character is immediately accepted, i.e. the user is not required to press enter key after typing a character.

Is This Answer Correct ?    13 Yes 2 No

what is the difference between getch() and getchar()?..

Answer / govind

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 ?    10 Yes 4 No

what is the difference between getch() and getchar()?..

Answer / barath krishnan

getchar() is very similar to using scanf with %c. The getch() function is normally used in 2 cases
1 To read any character not just numbers and alphabets but any
non white space character ( any key oder dan num/caps/scroll locks or tab keys)
2 To keep reading from a stream of inputs without forcing the user to press enter key at the end of each input unlike getchar()

Is This Answer Correct ?    7 Yes 1 No

what is the difference between getch() and getchar()?..

Answer / arjun tiwari

What is difference between getchar and getch?
Computer Programming Questions
Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > C Programming
View Slide Show
Best Answer
Getchar() will accept a character from keyboard displays immediately while typing and need Enter key to pressed for proceeding.

Getch() Normally we will use it at the end of the main(). It just accepts a key stroke and never displays it and proceeds further.
Getche() will accept a character from keyboard display it immediately does not wait for Enter key to pressed for proceeding.
__________________________________________________________________
getch() - get character from screen without echo and compiler didn't wait for another key.
getche() - get character from screen and compiler didn't wait for another key
getchar() - get character from screen and compiler wait for another key.
_____________________________

Is This Answer Correct ?    4 Yes 0 No

what is the difference between getch() and getchar()?..

Answer / mayur dharmik

getch()
1. Does not echo
2. procces immediatly the typed character and wait to hit Enter

Is This Answer Correct ?    2 Yes 0 No

what is the difference between getch() and getchar()?..

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

More C Interview Questions

If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).

5 Answers   Microsoft, Motorola,


What is the acronym for ansi?

0 Answers  


What is void c?

0 Answers  


though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks

3 Answers   State Bank Of India SBI,


Is exit(status) truly equivalent to returning the same status from main?

0 Answers  


given post order,in order construct the corresponding binary tree

0 Answers   S-Cube, Wipro,


Why doesnt that code work?

0 Answers  


how to write a cprogram yo get output in the form * *** ***** ******* ********* ******* ***** *** *

3 Answers  


write an interactive program to generate the divisors of a given integer.

7 Answers   TCS,


what is c?

4 Answers   IBM, TCS,


Explain pointers in c programming?

0 Answers  


What is s in c?

0 Answers  


Categories