Exam 10: Characters, C-Strings, and More About the String Class

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

You may use the <, >, <=, >=, ==, and != relational operators to compare string objects.

Free
(True/False)
4.7/5
(73)
Correct Answer:
Verified

True

What is the output of the following statement? What is the output of the following statement?

Free
(Multiple Choice)
4.9/5
(94)
Correct Answer:
Verified

B

"Whitespace" encompasses which of the following?

Free
(Multiple Choice)
5.0/5
(81)
Correct Answer:
Verified

D

A test using the isupper function will return false if the argument is an uppercase character.

(True/False)
4.8/5
(84)

To test whether a character is a numeric digit character, use this function.

(Multiple Choice)
4.9/5
(82)

The ftoa function converts a floating-point value to an ASCII value.

(True/False)
4.8/5
(67)

To determine whether a character is whitespace, use this function.

(Multiple Choice)
5.0/5
(73)

The isdigit function will return a true if its argument is a digit between 0 and 9.

(True/False)
5.0/5
(73)

If a C-string that cannot be converted to a numeric value is passed to the atoi function, the function's behavior is undefined by C++.

(True/False)
4.9/5
(83)

To use the strlen function in a program, you must also write #include ________.

(Multiple Choice)
4.8/5
(66)

This function accepts pointers to two C-strings and an integer argument, which indicates how many characters to copy from the second C-string to the first.

(Multiple Choice)
4.8/5
(78)

A library function that can find one C- string inside another is:

(Multiple Choice)
4.9/5
(77)

Look at the following statement. Look at the following statement.   The expression being tested by this statement will evaluate to true if var1 is: The expression being tested by this statement will evaluate to true if var1 is:

(Multiple Choice)
4.7/5
(88)

If an uppercase character is passed as an argument to toupper, the result will be an uppercase character.

(True/False)
4.8/5
(81)

Although C++ provides ample library functions to handle numeric values, we must write all of our own functions to manipulate character values.

(True/False)
4.9/5
(83)

The statement: char var1 = tolower (′A′) \left(^{\prime} A^{\prime}\right) Will result in:

(Multiple Choice)
4.8/5
(77)

The strlen function returns a C-string's length and adds one for \0.

(True/False)
4.8/5
(67)

This function will return true if its argument is a printable character other than a digit, letter, or space.

(Multiple Choice)
4.8/5
(77)

The C++ library provides functions for converting a string representation of a number to a numeric data type, and vice-versa.

(True/False)
4.8/5
(69)

The C++ compiler performs strict array bounds checking when it encounters an array of characters.

(True/False)
4.9/5
(86)
Showing 1 - 20 of 45
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)