0% found this document useful (0 votes)
13 views1 page

Check Your Progress

The document discusses console input/output functions in C, highlighting formatted and unformatted input/output. It explains the use of functions like scanf and printf from the standard I/O library, which requires including the <stdio.h> header file. Additionally, it details character input/output functions such as getch(), getche(), and getchar(), noting their differences in behavior.

Uploaded by

kenilkinda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Check Your Progress

The document discusses console input/output functions in C, highlighting formatted and unformatted input/output. It explains the use of functions like scanf and printf from the standard I/O library, which requires including the <stdio.h> header file. Additionally, it details character input/output functions such as getch(), getche(), and getchar(), noting their differences in behavior.

Uploaded by

kenilkinda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Console Input/Output Functions where input is supplied from the keyboard and

output displayed on the video display unit.


Formatted and Unformatted Input/Output: Formatted input/output allows us to
read the input or display the output to be formatted as per our requirements.

Unformatted Console Input/Output Functions :


Character Input/Output: Character input/output functions are useful for reading
and writing single characters from the keyboard and to the monitor. To read a single
character we use the getch(), getche() and getchar() functions.

3.5 CHECK YOUR PROGRESS - ANSWERS


3.1 & 3.2
1. a) scanf
b) printf
c) stdio.h
2. a) C does not have any built in input/output statements as a part of its grammar.
Therefore, all input and output operations are to be carried out with the help of
functions like printf and scanf. Many functions have now become standard for
input output in C. These functions are known as the standard I/O library. Most
of the standard Input/Output functions are included in the <stdio.h> (standard
input-output header file). Therefore, for effecting input/output functions, a C program
must include the <stdio.h> file. Some functions like printf and scanf do not
require the inclusion of the standard input/output header file.
b) Console Input/Output is one of the catagories of input/output functions available
in the standard input/output file <stdio.h>. In this category, input is supplied from
the keyboard and output displayed on the video display unit.

3.3.1
1. a) - iv
b) - iii
c)- i
d) - ii
2. a) Formatted input/output allows us to read the input or display the output to be
formatted as per our requirements. Formatting implies specifying where you want
the output to appear on the screen, how many spaces do you wish to have
between the various outputs, the number of decimal places after the decimal
point in case of float data etc. Thus in formatted input/output we input or output
data which has been arranged in a particular format.
b) getche() and getchar() are both functions used to read a character. getche() and
getchar() both echo (display) the character that is typed on the screen. However
the difference between these is that getchar() requires the user to hit the Enter
key after the character is typed in and getche() does not.

3.3.2.1 & 3.3.2.2


1. a) %d %f
b) after the % sign
c) 0 after the % sign

Input/Output / 67

You might also like