![](https://engineershub.in/profilepictures/17418/users/94610.jpeg)
![](https://engineershub.in/profilepictures/24729/users/50030.jpg)
In some situations, the scanf() function has one glaring weakness you need to fit the enter key before the function can be accepted what we have a type.
This is overcome by the getch( ) function, which will read a single character the instant it is typed without waiting for enter key to be typed followed character.
That you typed the getchar() is a macro and whereas the scanf( ) is a function.
The getchar( ) takes a single character at a time whereas scanf( ) can accept any number of inputs from the keyboard.
Scanf( ) accepts different type of data types whereas getchar( ) accepts only the character constants or digits or characters.
Recommended Questions
Useful Files
Users Joined
![](https://engineershub.in/profilepics/default/users.png)
![](https://engineershub.in/profilepics/default/users.png)
![](https://engineershub.in/profilepics/default/users.png)
![](https://engineershub.in/profilepics/default/users.png)
![](https://engineershub.in/profilepics/default/users.png)
In some situations, the scanf() function has one glaring weakness you need to fit the enter key before the function can be accepted what we have a type.
This is overcome by the getch( ) function, which will read a single character the instant it is typed without waiting for enter key to be typed followed character.
That you typed the getchar() is a macro and whereas the scanf( ) is a function.
The getchar( ) takes a single character at a time whereas scanf( ) can accept any number of inputs from the keyboard.
Scanf( ) accepts different type of data types whereas getchar( ) accepts only the character constants or digits or characters.
![](https://engineershub.in/themes/ehthree/images/loader.gif)
![EngineersHub Logo](https://engineershub.in/themes/ehthree/images/ehh.png)