Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
For the operator + to work with the string data type, one of the operands of + must be a(n) ____________________ variable.
(Short Answer)
4.8/5
(32)
What is the output of the following code? enum courses {ALGEBRA, BASIC, PASCAL, PHILOSOPHY, ANALYSIS};
courses registered;
registered = ALGEBRA;
cout << registered << endl;
(Multiple Choice)
4.8/5
(35)
The string expression strVar.____________________ starts at index pos, replaces the next n characters of strVar with all the characters of str.
(Short Answer)
4.8/5
(32)
Consider the following statements: string str1 = "Gone with the wind";
String str2;
After the statement str2 = str1.substr(5,4); executes, the value of str2 is "____".
(Multiple Choice)
4.9/5
(41)
The identifiers in the system-provided header files such as iostream, cmath, and iomanip are defined in the namespace ____.
(Multiple Choice)
4.8/5
(38)
Suppose str = "ABCDEFGHI". The output of the statement cout << str.length() << endl;
Is ____.
(Multiple Choice)
4.9/5
(36)
Suppose str = "xyzw";. After the statement str[2] = 'Y'; The value of str is "____".
(Multiple Choice)
4.8/5
(34)
A data type wherein you directly specify values in the variable declaration with no type name is called a(n) ____________________type.
(Short Answer)
4.8/5
(42)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)