Single characters can be entered into the computer using the C library function getchar.
In general terms, a function reference would be written as
character variable =getchar();
A C program contains the following statements.
char c;
..........
c=getchar();
The first statement declares that c is a character type variable.The second statement causes a single character to be entered from the standard input device and then assigned to c.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment