Tuesday, 15 November 2016

Difference between gets(),getch(),getche(),getchar()-c program tutorial

Here this tutorial explain the difference between input functions gets(),getch(),getche(),and getchar() in a c program.The compiler used is Code Blocks.





gets() used to read a string and getch(),getche(),getchr() are used to read character

gets() -       Reading or accepting a string from the user

getch() -      it do not displayed on the screen and do not wait for enter key

getche() -     it displayed on the screen and don't wait for the enter key

getchar() - it displayed on the screen and wait for the enter key