W9 - INPUT FUNCTIONS Flashcards

1
Q

W9-1: stdio module

A
_ Standard INPUT refers to the system KEYBOARD and standard OUTPUT refers to the system DISPLAY.  
_ The system HEADER file that contains the PROTOTYPES for the FUNCTIONS in this module is .
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

W9-2: What is a BUFFER?

A

A BUFFER is a SMALL region of memory that holds data temporarily and provides intermediate storage between a device and a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

W9-3: UNFORMATTED INPUT

A
_ The function getchar() retrieves the next UNREAD character from the input buffer. 
_ getchar() returns either
    (a) the character code for the retrieved character
    (b) EOF:  the symbolic name for end of data. It is assigned the value -1 in the  system header file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

W9-4: FORMATTED INPUT

A
_ The scanf() function retrieves the next set of UNREAD characters from the input buffer and translates them according to the conversion(s) specified in the format string.  
_ scanf() extracts only as many characters as required to satisfy the specified conversion(s).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

W9-5: Conversion Specifiers

A

_ Each conversion specifier begins with a % symbol and ends with a CONVERSION CHARACTER
_ The conversion character describes the TYPE to which scanf() is to convert the next set of TEXT characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

W9-6: Whitespace

A

_ scanf() treats the whitespace between text characters of the user’s input as a separator between input values. _ There is no need to place a blank character between the conversion specifiers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

W9-7: Return Value

A
_ scanf() returns either the number of addresses successfully filled or EOF.  
_ The return code from scanf() does NOT reflect success of %* conversions or any successful reading of PLAIN characters in the format string.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly