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

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

When using the strcat function you must be careful not to overwrite the bounds of an array.

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

True

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

Free
(True/False)
4.8/5
(40)
Correct Answer:
Verified

True

Which of the following converts the string "10" to the integer value 10?

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

C

To use the strlen function in a program you must include

(Multiple Choice)
4.9/5
(34)

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

(Multiple Choice)
4.9/5
(34)

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

(True/False)
4.9/5
(39)

Given the string shown below, if the delimiter is a space, how many tokens are in the string? "Tony's email address is tony_g@mycollege.edu"

(Multiple Choice)
4.7/5
(26)

To determine whether a character entered is a letter of the alphabet, use the __________ function.

(Multiple Choice)
4.9/5
(34)

The function that converts a C-string to an integer and returns the integer value is

(Multiple Choice)
4.8/5
(36)

In C++ a C-string is a sequence of characters stored in consecutive memory, terminated by a

(Multiple Choice)
4.9/5
(34)

The function that accepts a C-string as an argument and converts the string to a long integer is

(Multiple Choice)
4.7/5
(30)

To determine whether a character entered is whitespace, use the __________ function.

(Multiple Choice)
4.8/5
(42)

The function that accepts pointers to two C-strings and an integer argument that indicates how many characters to copy from the second string to the first is

(Multiple Choice)
4.8/5
(30)

The string class's front and back member functions were introduced in C++11.

(True/False)
4.7/5
(27)

Which of the following statements appropriately defines a C-string that stores names of up to 25 characters?

(Multiple Choice)
4.8/5
(41)

What is the result after the following statement executes? Char var1 = tolower('A');

(Multiple Choice)
4.8/5
(29)

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

(True/False)
4.7/5
(42)

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

(True/False)
4.9/5
(34)

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

(True/False)
4.9/5
(32)

In C++11, assuming mychar is a char variable and mystring is a string, what is the value of mychar after the following statement executes? Mychar = mystring.front();

(Multiple Choice)
4.8/5
(32)
Showing 1 - 20 of 47
close modal

Filters

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