Exam 8: Strings and Vectors

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

The function used to 'put two c-strings together into one" is called

(Short Answer)
4.8/5
(36)

The following code declares a vector of integers named numbers that reserves space for 100 integers. vector<int> numbers100);

(True/False)
4.8/5
(34)

What is the value of numbers.size) after the following code? Vector<float> numbers100);

(Multiple Choice)
4.9/5
(39)

What is wrong with the following code fragment? Char str1[10]="Mark", str2[15]="What's my name"; Strcpystr1,str2);

(Multiple Choice)
4.8/5
(35)

What is the difference between strcat and strncat?

(Essay)
4.9/5
(36)

If the capacity of a vector named names is 20 and the size of names is 19, which of the following statements are legal?

(Multiple Choice)
4.7/5
(40)

Given the following declarations, which of the following is legal syntax? String str="Your name"; Char c_string[20]="My name";

(Multiple Choice)
4.9/5
(30)

Which assignment statements will copy the value " toaster" into a string variable str1)?

(Multiple Choice)
4.9/5
(38)

Which is the proper way to determine how many characters are in the string variable named str?

(Multiple Choice)
4.9/5
(36)

How can you assign the value "toaster" to a c-string name str of size 10?

(Multiple Choice)
4.8/5
(35)

strcmpfirst, second) returns

(Multiple Choice)
4.8/5
(33)

In a vector, which of the following statements is true?

(Multiple Choice)
4.8/5
(32)

Which of the following declarations correctly creates a c-string that can hold the value "phonebook"

(Multiple Choice)
4.8/5
(34)

The notation vector<Base_Type> means that the vector is

(Multiple Choice)
4.7/5
(29)

When the extraction operator is used to read data into a string,

(Multiple Choice)
4.8/5
(32)

What is the value of str after the following code? String str;

(Multiple Choice)
4.8/5
(37)

To convert a string object that stores an integer to a variable of type int one can use the C++11 function ____________.

(Short Answer)
4.8/5
(46)

How do you concatenate two string values str1, str2)?

(Short Answer)
5.0/5
(41)

The character '\0' is called the __________ character.

(Short Answer)
4.8/5
(37)

To add an element to a vector of integers named numbers at the next available position in the vector, you would use:

(Multiple Choice)
4.9/5
(41)
Showing 21 - 40 of 69
close modal

Filters

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