Exam 12: More on C-Strings and the String Class
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C++40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions37 Questions
Exam 5: Looping38 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays37 Questions
Exam 9: Searching, Sorting, and Algorithm Analysis36 Questions
Exam 10: Pointers50 Questions
Exam 11: More About Classes and Object-Oriented Programming64 Questions
Exam 12: More on C-Strings and the String Class38 Questions
Exam 13: Advanced File and Io Operations38 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions20 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 Trees37 Questions
Select questions type
The >> operator can be used to convert a value of type double to an equivalent string object stored in memory.
(True/False)
4.9/5
(36)
Assume that str1 and str2 are objects of the string class. The proper expression to use when comparing them for equality is
(Multiple Choice)
4.9/5
(37)
An array of characters ending with the null terminator is called
(Multiple Choice)
4.8/5
(36)
The following statement declares a string object and initializes it to "Once upon a time".
string theString("Once upon a time");
(True/False)
4.8/5
(36)
The function _ _ accepts pointers to two strings and an integer argument, which indicates how many characters to copy from the second string to the first.
(Multiple Choice)
5.0/5
(50)
There exist C++ stream classes that write and read in- memory strings.
(True/False)
4.8/5
(39)
The function converts a C- string to an integer and returns the integer value.
(Multiple Choice)
4.8/5
(33)
A good way to convert a value of type double to a string is
(Multiple Choice)
4.8/5
(41)
After num = atoi("1000"); executes, what value is stored in the variable num?
(Multiple Choice)
4.7/5
(46)
The string class member function will return the number of characters in the string object.
(Multiple Choice)
4.7/5
(31)
To account for the null terminator stored at the end of each C- string, the strlen function returns the number of characters in its argument, plus one.
(True/False)
4.8/5
(40)
The C++ compiler performs strict array bounds checking whenever an array of characters is being accessed.
(True/False)
4.9/5
(36)
Showing 21 - 38 of 38
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)