Console I/O Functions
Input/output
The information we put into a computer is called input and the information we're given from the computer is called output.
There is no keyword available in c for doing input/output or I/O, all I/o in c is done by using standard library function. there are several function library is available for performing input/output.
I/O library function can be classified into two broad categories
1). Console I/O functions
Function to receive input from the keyboard and write output usually on the computer screen.
2). File I/O function
Function to perform I/O operations on a hard disk.
Here we are going to discussing on console i/o function only. The file i/o functions would be discussed in other computer.
Console I/O Functions
As we discuss above function to receive input from keyboard and write output on screen. The screen and keyboard together called a console.
Console I/O function can be further classified into two categories formatted and unformatted console i/o functions.
1). Formatted Functions
| Data type | Input | Output |
| Char
int float string | scanf() | printf() |
2). Unformatted Functions
| Data type | Input | Output |
| char | getch()
getche() getchar() | putch()
putchar() |
| int
float | --- | --- |
| string | gets() | puts() |