CH8/CH9 Test Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

A(n) ________ can be used in a scanf conversion specifier to indicate that a specific number of characters or digits should be read from the input stream.

A

field width

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

The field width and precision in a printf conversion specifier can be controlled with integer expressions by substituting a(n) __ for the field width or for the precision and placing an integer expression in the corresponding argument of the argument list.

A

asterisk

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

All input and output is dealt with in the form of __

A

streams

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

The __ stream is normally connected to the keyboard *****

A

standard input

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

The __ stream is normally connected to the computer screen.

A

standard output

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

Precise output formatting is accomplished with the __ function.

A

printf

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

The format control string may contain __, __, __, __ and __.

A

flags, field widths, precisions, conversion specifiers and literal characters.

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

The conversion specifier __ or __ may be used to output a signed decimal integer

A

d or i

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

The conversion specifiers __, __ and __ are used to display unsigned integers in octal, decimal and hexadecimal form, respectively.

A

o, u and x

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

The modifiers __ and __ are placed before the integer conversion specifiers
to indicate that short or long integer values are to be displayed.

A

H and L

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

The conversion specifier __ is used to display a floating-point value in exponential notation ***

A

%e

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

The modifier __ is placed before any floating-point conversion specifier to indicate
that a long double value is to be displayed

A

L

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

The conversion specifiers e, E and f are displayed with __ digits of precision to the right of the decimal point if no precision is specified.

A

6

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

The conversion specifiers __ and __ are used to print strings and characters, respectively.

A

s and c

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

All strings end in the __ character

A

null

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

The __ flag causes output to be left justified in a field.

A
  • (minus)
17
Q

The __flag causes values to be displayed with either a plus sign or a minus sign.

A

+ (plus)

18
Q

Precise input formatting is accomplished with the __function

A

scanf

19
Q

A(n) __ is used to scan a string for specific characters and store the characters in
an array.

A

scan set

20
Q

The conversion specifier __ can be used to input optionally signed octal, decimal
and hexadecimal integers.

A

%i

21
Q

The conversion __ specifiers can be used to input a double value

A

%lf

22
Q

The __ is used to read data from the input stream and discard it without assigning
it to a variable.

A

assignment suppression character

23
Q

A(n) __ can be used in a scanf conversion specifier to indicate that a specific
number of characters or digits should be read from the input stream.

A

field width

24
Q

in c it is appropriate to say that a string is a __.

A

pointer

25
Q

which character ha dling library function converts lowercase letters to uppercase letters

A

toupper

26
Q

function __ inputs the next character from the standard input and returns it as an integer

A

getchar

27
Q

what is the output of the following statement

printf(“%s”, strspn(“Cows like to moo.”,”Ceiklosw”);

A

10