Chap No 08 (Input Output Handling of C)
Chap No 08 (Input Output Handling of C)
In turbo c++, the input and output operations are carried out through built-in function. Through
these functions data can be read from keyboard or displayed on monitor. the execution of the
program can be interrupted by input / output calls. Hence data can be entered or output can be
taken during execution of program.
String input:
C contains a number of library functions to input test strings. The most common method is the use
of gets ( ) function which is smaller and faster as compared to the formatted input functions.
The gets ( ) function:
The function gets ( ) stands for “get string”. It reads a string from the keyboard , adds the null
character ‘\0’ to it, and assigns it to the required variable , which comes as an argument of the
function. The newline character’\n’ (created by increasing the enter key) signals the end of the
string.
String output:
C contains a number of library functions to output text strings. The most common method is
the use of puts ( ) function which is smaller and faster as compare to the formatted input functions.