Exam 12: More on C-Strings and the String Class
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees38 Questions
Select questions type
It is possible to implement a string class by using a dynamically allocated array of characters.
(True/False)
4.9/5
(29)
If str is a string class object, the member function str.length() returns
(Multiple Choice)
4.9/5
(31)
The ________ library function reverses the order of a character array.
(Multiple Choice)
4.8/5
(38)
An array of characters ending with the null terminator is called
(Multiple Choice)
4.9/5
(31)
To declare an array that will store students' last names of up to 25 characters in length, which is an appropriate statement?
(Multiple Choice)
4.9/5
(38)
When using the strcat function, you must be careful not to overflow the bounds of the array allocated for the target string.
(True/False)
4.9/5
(28)
To use the ostringstream class, you must include the memstringstream header file.
(True/False)
4.9/5
(46)
The ________ function converts an integer to a string and returns the string value.
(Multiple Choice)
4.9/5
(39)
There exist C++ stream classes that write and read in-memory strings.
(True/False)
4.8/5
(39)
The ________ function accepts a C-string as an argument and returns the length of the string (not including the null terminator).
(Multiple Choice)
4.9/5
(34)
The ________ function concatenates the contents of one C-string with another C-string.
(Multiple Choice)
4.9/5
(39)
The type of the literal string "Hello" is best described as
(Multiple Choice)
4.9/5
(44)
After num = stoi("1000"); executes, what value is stored in the variable num?
(Multiple Choice)
4.8/5
(33)
A C-string can be assigned to a variable whose type is the string class.
(True/False)
4.7/5
(35)
To access the last character of a string class object str you can use the expression
(Multiple Choice)
4.8/5
(36)
A library function that looks for the occurrence of one string inside another is
(Multiple Choice)
4.7/5
(33)
A C-string is a sequence of characters stored in consecutive memory, terminated by a
(Multiple Choice)
4.7/5
(39)
A good way to convert a string such a "572" to an equivalent integer such as 572
(Multiple Choice)
4.9/5
(35)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)