The input and output function of computer facilitate communication with the external world. They also facilitate interactions between the computer and the user. The user has to popular medium i.e.., the peripheral device for input is the keyboard. Keying is of input data into the computer at run-time is achieved easily by library functions, which are supplied along with the "C" complier and have been standardised. The function which enable input keyboard are given below.
communicates its output i.e., the result of computation. either through the console video monitor, printer , disk drive or Input/Output ports. Since we are learning "C" through the PC, we will get the output through the video monitor, to start with. Just as there are library functions for input, there are standard library function for output as well. They are given below.
Given input and getting output are archived by using the standard library function as outlined above.
Note that all the function names are followed by parenthesis. The parenthesis are meant for passing arguments or getting arguments. The arguments may be absent in certain functions as in the case of main().However, function names must be followed by parenthese to indicate to the compiler that they are function. Arguments can be either variables or constants.
It is the type of data that the user going to accept via the input statements, this can be formatted and always preceded with a '%' sign the below table illustrates code formats (control strings) in input/output statement.
| Format code
||Floating point value