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 use of getch() function in C program..
difference b/w getch() and getche()??

Answer Posted / lekha

Both getch() and getche() are used to read single character
there is very little difference
-getch() doesn't display output to screen if used without lvalue
-getche() display output to screen even if used without lvalue

following example will clear this.....
1.
main()
{
getch();
}
2.
main()
{
getche();
}
after running above programs...............
when you press any key, you'll exit from output screen
verify the output by pressing alt+F5
1. will not show anything
2.will show the key you were pressed......
hope you get it.............

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is array name a pointer?

1035


Explain how do you print only part of a string?

1222


How do I swap bytes?

1076


What does s c mean on snapchat?

1115


What are the different types of errors?

1142


What are the difference between a free-standing and a hosted environment?

1292


What is difference between union All statement and Union?

1113


Explain the advantages of using macro in c language?

1003


Explain the difference between null pointer and void pointer.

1092


What is meant by keywords in c?

1071


Explain why c is faster than c++?

1073


What are called c variables?

1066


How macro execution is faster than function ?

1197


What is a floating point in c?

1075


What is the purpose of & in scanf?

1078