Introduction to C programming II Flashcards

1
Q

What is a stream?

A

A stream is a sequence of characters flowing from one place to another.

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

Types of stream.

A

Input stream: data flows from input device into memory.
Output stream: data flows from memory to output device e.g monitor, file, printer

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

What are the standard I/O streams

A

stdin: Standard input stream
stdout: Standard output stream
stderr: standard error stream.

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

What is Formatted I/O

A

Refers to the conversion of data to and from a stream of characters.

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

What is a conversion specifer

A

A conversion specifier is a symbol that is used as a placeholder in a formatting string.

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

What are some examples of format specifiers

A

%d
%6d - prints a decimal integer with a width of at least 6 wide
%f
%.4f - prints a floating point with a precision of four character after the decimal point
%3.2f

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