what is the difference between getch() and getchar()?
Answer Posted / 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 |
Post New Answer View All Answers
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
Why doesn't C support function overloading?
Is exit(status) truly equivalent to returning the same status from main?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
What is array in c with example?
What is a pragma?
Linked lists -- can you tell me how to check whether a linked list is circular?
What are the 4 types of functions?
Does free set pointer to null?
Explain 'bus error'?
How can I generate floating-point random numbers?
code for quick sort?
What are the disadvantages of external storage class?
how to find anagram without using string functions using only loops in c programming
What is the use of getchar functions?