Exam 8: Strings and Vectors
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
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)
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)
Which of the following declarations correctly creates a c-string that can hold the value "phonebook"
(Multiple Choice)
4.8/5
(34)
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)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)