Exam 9: Classes: a Deeper Look; Throwing Exceptions
Exam 1: Introduction to Computers and C++32 Questions
Exam 2: Introduction to C Programming; Inputoutput and Operators22 Questions
Exam 3: Introduction to Classes, Objects and Strings33 Questions
Exam 4: Control Statements, Assignment, and Operators29 Questions
Exam 5: Control Statements, Logical Operators31 Questions
Exam 6: Functions and an Introduction to Recursion48 Questions
Exam 7: Class Templates Array and Vector; Catching Exceptions18 Questions
Exam 8: Pointers and Pointer-Based Strings32 Questions
Exam 9: Classes: a Deeper Look; Throwing Exceptions35 Questions
Exam 10: Operator Overloading; String and Array Objects34 Questions
Exam 11: Object-Oriented Programming: Inheritance17 Questions
Exam 12: Object-Oriented Programming: Polymorphism27 Questions
Exam 13: Stream Inputoutput: a Deeper Look34 Questions
Exam 14: File Processing19 Questions
Exam 15: Standard Library Containers and Iterators33 Questions
Exam 16: Standard Library Algorithms27 Questions
Exam 17: Exception Handling: a Deeper Look20 Questions
Exam 18: Introduction to Custom Templates9 Questions
Exam 19: Custom Templatized Data Structures17 Questions
Exam 20: Searching and Sorting10 Questions
Exam 21: Class String and String Stream Processing28 Questions
Exam 22: Bits, Characters, C Strings and Structs30 Questions
Exam 23: Other Topics22 Questions
Exam 24: C++11 Additional Features56 Questions
Select questions type
The type of function a client would use to check the balance of a bank account would be:
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
C
Parameterized stream manipulator setfill specifies the fill character that's displayed when an output is displayed in a field wider than the number of characters or digits in the output. The effect of setfill applies:
Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
C
A class's functions can throw exceptions, such as __________to indicate invalid data.
Free
(Multiple Choice)
4.9/5
(39)
Correct Answer:
C
Which of the following statements about friend functions and friend classes is false?
(Multiple Choice)
5.0/5
(27)
Given the class definition: class CreateDestroy
{
Public:
CreateDestroy() {cout << "constructor called, ";}
~CreateDestroy() {cout << "destructor called, ";}
};
What will the following program output?
Int main()
{
For (int i = 1; i <= 2; ++i) {
CreateDestroy cd;
}
Return 0;
}
(Multiple Choice)
4.7/5
(22)
Assume that t is an object of class Test, which has member functions a(), b(), c() and d(). If the functions a(), b() and c() all return references to an object of class Test (using the dereferenced this pointer) and function d() returns void, which of the following statements will not produce a syntax error:
(Multiple Choice)
4.8/5
(24)
Assuming the following constructor is provided for class Time explicit Time(int = 0, int = 0, int = 0);
Which of the following is not a valid way to initialize a Time object?
(Multiple Choice)
4.7/5
(29)
Which of the following is not true of a constructor and destructor of the same class?
(Multiple Choice)
4.8/5
(36)
Inside a function definition for a member function of an object with data member x, which of the following is not equivalent to this->x:
(Multiple Choice)
4.8/5
(39)
Which of the following statements will not produce a syntax error?
(Multiple Choice)
4.9/5
(36)
A class-scope variable hidden by a block-scope variable can be accessed by preceding the variable name with the class name followed by:
(Multiple Choice)
4.7/5
(27)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)