Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
Suppose str = "xyzw";. After the statement str[2] = 'Y'; The value of str is "____".
Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
C
The general syntax for accessing a namespace member is: namespace_name->identifier.
Free
(True/False)
4.8/5
(36)
Correct Answer:
False
Suppose str = "ABCDEFGHI". The output of the statement cout << str.length() << endl;
Is ____.
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
C
An enumeration type can be passed as a parameter to a function only by value.
(True/False)
4.9/5
(35)
Consider the declaration:
Enum sports {BASKETBALL, FOOTBALL, HOCKEY, BASEBALL, SOCCER};
Which of the following statements is true?
(Multiple Choice)
4.8/5
(35)
Which of the following statements creates an anonymous type?
(Multiple Choice)
4.8/5
(41)
The data type string has a named constant, ____, associated with it.
(Multiple Choice)
4.9/5
(32)
Consider the following statements: After the statement str2 = str1.substr(1,4); executes, the value of str2 is "____".


(Multiple Choice)
4.8/5
(35)
A data type wherein you directly specify values in the variable declaration with no type name is called a(n) ____________________type.
(Short Answer)
4.9/5
(37)
The values in the domain of an enumeration type are called ____________________.
(Short Answer)
4.8/5
(36)
In ANSI/ISO Standard C++, the ____________________ mechanism was designed to solve the problem of overlapping global identifiers.
(Short Answer)
4.8/5
(37)
The identifiers in the system-provided header files such as iostream, cmath, and iomanip are defined in the namespace ____.
(Multiple Choice)
4.9/5
(40)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)