Title | Class Object - CS notes |
---|---|
Author | Bhavi Patel |
Course | Introduction to Computer Programming Using C++ |
Institution | Ohlone College |
Pages | 13 |
File Size | 267.3 KB |
File Type | |
Total Downloads | 23 |
Total Views | 157 |
CS notes...
Chapter 13 - OOP Class 1, Chapter 13 object review, Ch13 Classes C++, Ch 13 - C++, Obj. Programming Exam 2
30.
An array is not: a. A consecutive group of memory locations. b. Subscripted by integers. c. Made up of different data types. d. None of the above.
c
31.
The array subscript operator [], when overloaded, cannot: a. Be used with linked list classes. b. Take a float as an operand. c. Take multiple values inside (e.g., [4,8]). d. Take user-defined objects as operands.
c
32.
The assignment operator (=) can be used to: a. Test for equality. b. Copy data from one object to another. c. Compare two objects. d. Copy a class.
b
33.
Assume that myCar is an instance of the Car class, and that the Car class has a member function named accelerate. Which of the following is a valid call to the accelerate member function?
myCar.accelerate();
34.
Assume that the array named items contains the integer values 0, 2, 4, 6 and 8. Which of the following set c of statements uses the range-based for loop to display each value in items? a. for (int i = 0; i...