(i) get() function:
The get() function is member of istream class. It is used to read a single character from the keyboard.
Syntax of get() function:
get(variable_name);
example:
char c;
cin.get(c);
In the above example, variable „c‟ is a character variable. The get () function reads a single character from the keyboard and stores it inside variable „c‟.
(ii) put( ) function:
The put() function is member of ostream class. It is used to output a single character on the screen.
Syntax:
put(character/variable_name);
example:
cout.put(„X‟);
The above example displays character „X‟ on the screen.