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 are the modifiers available in c programming language?
What are Macros? What are its advantages and disadvantages?
Explain the difference between structs and unions in c?
How does struct work in c?
Write a program to swap two numbers without using third variable in c?
Explain the difference between exit() and _exit() function?
What is use of bit field?
Explain the bubble sort algorithm.
What is the correct declaration of main?
What are logical errors and how does it differ from syntax errors?
What are disadvantages of C language.
What is a dynamic array in c?
Is javascript based on c?
What are pointers?
Why is c so important?