COP 1220 chapter 9

Ace your homework & exams now with Quizwiz!

Which of the following would output a "%" sign when used in the format control string of the printf statement?

%%

which of the following is not a flag that can be used in the printf format-control string?

/

what would be the output of the following statement? printf("%4d", 123456);

3456

values printed with the conversion specifiers e, E and f are output with ______ digits of precision to the right of the decimal point by default.

6 digits

With the %g conversion specifier, the value 0.0000875 prints as

8.75e-05

The floating point conversion specifiers e and E display floating point values in _____________ notation.

Exponential

When used with integer conversion specifiers, the letters h and l"el" are called?

Length modifiers

Which of the following is not a standard C formatted stream?

Redirection stream

The %g conversion specifier indicates ____________.

Significant digit

Which integer conversion specifier would display the hexadecimal digit A?

X (uppercase)

Which of the following is not a scape sequence?

\c

what does the 4 signify in the following statement? prinf("%4i\n", 123);

a field width

The ________ character reads data from the input stream and discard the data.

assigned suppression

The %I scanf conversion specifier is not capable of inputting which type of data?

binary

A field width ____________ be include in the format control string of the scanf statement

can

Which is not a formatting capability of printf?

centering

Conversion specifier c requires a (n.___________ argument.

char argument

A floating-point value always contains a ___________.

decimal point

Conversion specifier p ______________.

displays a pointer value in implementation

A printf format control string must be enclosed in

double quotes

The %e conversion specifier indicates ___________.

floating point

Which function does not use either the standard input stream or the standard output stream?

gettime

Place _____________ before any integer conversion specifier to indicate that a short integer is to be displayed.

h

What does the \\ do when used in a format control string?

it outputs the backslash character

in 1.50482E+02, the E+02 indicates that _____________.

multiply by 100 or raised the number to the second power

Which is not a format control string flag?

new line

Conversion specifiers g or G always print __________.

no training zeros

Which integer conversion specifier displays an unsigned octal integer?

o(lower case)

Conversion specifiers e and E always print exactly __________ to the left of the decimal point.

one digit

Conversion specifier s requires a(n. _______________ argument.

pointer to char

Which is not a part of a format control string?

printf

Which is not a formatting capability of printf 2?

representing unsigned integers in binary format.

If the field width is larger than the data being printed, the data will normally be ____________ within that field.

right justified

Which statement about the I and d integer conversion specifies is false?

they are identical when used with scanf

Which integer conversion specifier displays an unsigned decimal integer?

u (lowercase)

which is not a common programming error with regard to the character and string conversion specifiers.

using double quotes around a string

What would be the output of the following statement? char * value = 'hello'; printf('%s', value);

value


Related study sets

Atom - The smallest unit of an element that has all the properties of that element. The basic building block of all matter.

View Set

How to Use Commas: Match the rule to the example!

View Set

Florida B.E.S.T. Standards 6-12 Glossary

View Set