473,508 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is difference between getch() and getchar() in c language ?

1 New Member
what is difference between getch() and getchar() in c language ?
Dec 17 '10 #1
2 2553
johny10151981
1,059 Top Contributor
did you tried program and see. Its crystal clear you write a simplest program.

if your compiler dont support conio.h in that case it would be hard to know
Dec 17 '10 #2
donbock
2,426 Recognized Expert Top Contributor
getchar is a Standard Library function (part of stdio.h). It is supported on all platforms.

getch is not part of the Standard (it is part of conio.h). Code that uses getch is nonportable.

For functional differences you should search for the man pages for stdio.h and conio.h.
Dec 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3646
by: diadia | last post by:
string s = "hello"; const char *p = s.begin(); cout << p << endl; // print hello s = ""; char *p2= s.begin(); cout << p2 << endl; // print hello why?????
11
3386
by: J Wang | last post by:
dear, I debug the program recently as follows. #include <sys/stat.h> int main(int argc, char *argv) { struct stat buf;
0
2094
by: programer | last post by:
Can I use Activex (as vb) to connect database when I use vc.net.
28
9840
by: srikanth | last post by:
help me out with the subject
16
23340
by: supriya12345 | last post by:
hi everybody. Could u plz explain what's the difference between getchar(),getche() and getch() functions. Also explain the concept of buffer .
0
2448
by: RupeshDeenadayalan | last post by:
Is there any difference between a boot loader and a boot strapper.It would be better if any one can tell what operations does a general bootloader,boot strapper,BSP,Driver does???
5
1582
by: vicky | last post by:
why is the output of the following command is 4 4 5. main() { int a=2; printf("%d",printf("\n%d %d",a,a,a); getch(); } i did not understand what these two printf in a command signifies.
5
10416
by: bhushanbagul | last post by:
Hi All Please let me know exactly what difference i and g makes in oracle version i.e. when we say oracle 10g or oracle 11i Thanks Bhushan
2
27529
by: Ganesan18 | last post by:
what should be the difference between these getch(), getchar() and getche. if possible give me an example
3
2271
tharden3
by: tharden3 | last post by:
What is the Progamming Language most commonly used to make big name games like COD4? Is it java? Would you use different ones for different types of games?
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.