Deck 11: More About Classes and Object-Oriented Programming

ملء الشاشة (f)
exit full mode
سؤال
C++ permits you to overload the sizeof operator.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A reason to overload the ________ is to write classes that have array-like behavior.

A) parentheses ( )
B) curly braces { }
C) square brackets [ ]
D) colon : :
E) None of the above
سؤال
When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have free access to the other's private members.
سؤال
C++ requires that a copy constructor's parameter be

A) an integer data type.
B) a floating-point data type.
C) a pointer variable.
D) a reference to an object.
E) None of the above
سؤال
When a class contains a pointer to dynamically allocated memory, it a good idea to have the class overload the assignment operator.
سؤال
Each object of a class has its own copy of the class's

A) static member variables.
B) instance member variables.
C) static member functions.
D) All of the above
E) None of the above
سؤال
A good reason for overloading an operator is to enable it to

A) outperform its C language counterparts.
B) be used with types defined by the programmer.
C) operate on more operands than in its standard definition.
D) operate on no operands.
E) None of the above
سؤال
The ________ operator may be used to assign one object to another.

A) =
B) ==
C) <>
D) &
E) None of the above
سؤال
You can overload the conditional operator to make it function as an unconditional operator.
سؤال
If a function f is a friend of a class A, and the class A is a friend of a class B, then the function f is able to access private members of B.
سؤال
A static member variable can be used when there are no objects of the class in existence.
سؤال
By default, when an object is assigned to another, each member of one object is copied to its counterpart in the other object.
سؤال
When a class contains a pointer to dynamically allocated memory, it is a good idea to equip the class with

A) a dynamically allocated constructor.
B) a copy constructor.
C) a static constructor and an overloaded comparison operator.
D) an inline constructor.
E) None of the above
سؤال
If you do not furnish a(n) ________, an automatic memberwise copy will be performed when one object is assigned to another object.

A) overloaded constructor function
B) overloaded assignment operator
C) default constructor function
D) overloaded copy operator
E) None of the above
سؤال
It is a good idea to make a copy constructor's parameters ________ by specifying the ________ keyword in the parameter list.

A) inline, inline
B) static, static
C) constant, const
D) global, glob
E) None of the above
سؤال
The process of having a class contain an instance of another class is known as

A) object overloading.
B) operator overloading.
C) object composition.
D) dynamic composition.
E) None of the above
سؤال
If you overload the prefix ++ operator, the postfix ++ operator is automatically overloaded also.
سؤال
When you overload the << operator, you must also overload the >> operator.
سؤال
C++ allows you to overload

A) compiler errors.
B) preprocessor directives.
C) operators and functions.
D) undefined variables.
E) None of the above
سؤال
A(n) ________ member variable may be accessed before any objects of the class have been declared.

A) private
B) public
C) inline
D) static
E) None of the above
سؤال
A member function that is declared ________ cannot use the this pointer.

A) private
B) public
C) static
D) inline
E) None of the above
سؤال
If a member variable is declared ________, all objects of that class share access to that variable.

A) static
B) dynamic
C) inline
D) default
E) None of the above
سؤال
A lambda expression is

A) an expression whose value can only be assigned to a local variable.
B) used by the C++ compiler to check the types of other expressions.
C) a class derived from a function object.
D) an object of a class whose only member is the function call operator.
E) None of the above
سؤال
The library function move() can be used to

A) transfer ownership of a managed object from one unique_ptr object to another.
B) move the contents of a dynamically allocated block of memory to another address.
C) move the contents of any block of memory to another address.
D) make a raw pointer point to a different memory location.
سؤال
If an rvalue reference refers to a memory location, that memory location becomes an lvalue.
سؤال
________ members of a base class are never accessible to a derived class.

A) Public
B) Private
C) Protected
D) A, B, and C
E) None of the above
سؤال
A member function of a derived class may not have the same name as a member function of a base class.
سؤال
When you derive a class from an existing class, you

A) can add new data, but cannot add new functions.
B) can add new functions, but cannot add new data.
C) can add both new data and new functions.
D) must add both new data and new functions.
E) None of the above
سؤال
________ allows us to create new classes based on existing classes.

A) Polymorphism
B) Inheritance
C) Function overloading
D) The copy constructor
E) None of the above
سؤال
It is possible to declare an entire class as a friend of another class.
سؤال
A derived class may become a base class, if another class is derived from it.
سؤال
Some C++ operators cannot be overloaded by the programmer.
سؤال
A ________ function is not a member of a class, but it has access to the private members of the class.

A) static
B) constructor
C) destructor
D) friend
E) None of the above
سؤال
The ________ class constructor is called before the ________ class constructor.

A) base, derived
B) derived, base
C) public, private
D) private, public
E) None of the above
سؤال
A derived class may not have any classes derived from it.
سؤال
In the statement class Car:public Vehicle, which is the base class?

A) Car
B) Vehicle
C) public
D) class
E) None of the above
سؤال
In an inheritance situation, you can't pass arguments to a base class constructor.
سؤال
A situation in which every object of a class A has a pointer to an object of a class B, and the objects of the class B may outlive objects of class A, is called

A) a has-A relation.
B) aggregation.
C) composition.
D) an is=A relation.
E) None of the above
سؤال
Arguments are passed to the base class destructor function by the ________ class ________ function.

A) derived, constructor
B) derived, destructor
C) base, constructor
D) base, destructor
E) None of the above
سؤال
A static member function can be called independently of any object of the class.
سؤال
In an inheritance situation, the new class that you create from an existing class is known as the

A) derived class.
B) inheritee.
C) child class.
D) both A and C
E) None of the above
سؤال
To overload the + operator, you would write a function called

A) overload +.
B) operator +.
C) function +.
D) operator.overload(+).
E) None of the above
سؤال
A(n) ________ is a special function that is called whenever a new object is created and initialized with data from another object of the same class.

A) destructor
B) static function
C) copy constructor
D) assignment function
E) None of the above
سؤال
In C++, if you overload the < operator, you must also overload the > operator.
سؤال
The this pointer is automatically passed to static member functions of a class.
سؤال
If you do not furnish a(n) ________ for a class, a default will be provided for you by the compiler.

A) copy constructor
B) constructor
C) assignment operator
D) All of the above
E) None of the above
سؤال
A constructor that takes a single parameter of a type other than its class is called a convert constructor.
سؤال
When overloading the operator ++, ________ is used to distinguish preincrement from postincrement.

A) a parameterless data type
B) the keyword void
C) a dummy integer parameter
D) the placeholder [ ]
E) None of the above
سؤال
Object composition is useful for creating a ________ relationship between classes.

A) friend
B) static
C) has-a
D) conditional
E) None of the above
سؤال
The base class's ________ affects the way its members are inherited by the derived class.

A) name
B) return data type
C) access specification
D) both A and B
E) None of the above
سؤال
You may overload any C++ operator, and you may use the operator function to define non-standard operators, such as @ and ^.
سؤال
A static member function cannot be called if no objects of the class exist.
سؤال
When you redefine the way a standard operator works when it is used with class objects, you have ________ the operator.

A) reassigned
B) reformatted
C) overloaded
D) overwhelmed
E) None of the above
سؤال
An ________ operator can work with programmer-defined data types.

A) inline
B) unconditional
C) overloaded
D) undefined
E) None of the above
سؤال
Protected members of a base class are like ________, with the exception that they may be accessed by derived classes.

A) constructor functions
B) static members
C) private members
D) public members
E) None of the above
سؤال
When you overload an operator, you cannot change the number of operands taken by the operator.
سؤال
The this pointer is a special built-in pointer that is automatically passed as a hidden argument to all instance member functions.
سؤال
The structure member selector operator . cannot be overloaded.
سؤال
To dereference an object pointer and access one of the object's members, use the

A) -> operator.
B) <> operator.
C) dot operator.
D) & operator.
E) None of the above
سؤال
The ________ is a special built-in pointer that is available to a class's instance member functions.

A) overloaded -> operator
B) this pointer
C) &constructor pointer
D) ~destructor *ptr
E) None of the above
سؤال
The base class access specification can be viewed as a filter that base class members must pass through when becoming inherited members of a derived class.
سؤال
In the statement class Car:protected Vehicle, which is the derived class?

A) Car
B) Vehicle
C) protected
D) The answer cannot be determined from the information given.
E) None of the above
سؤال
In the statement class Car:protected Vehicle, what is being protected?

A) Derived class functions
B) Base class members
C) Derived class data
D) Future inherited classes
E) None of the above
سؤال
An lvalue is

A) a value of type long.
B) a memory location that is associated with a name that can be used by different parts of the program to access the memory location.
C) An expression denoting a value that appears as the left operand of a binary operator.
D) a value of type long returned from a function.
E) None of the above
سؤال
________ is commonly used to extend a class, or to give it additional capabilities.

A) Inheritance
B) Privacy
C) The constructor
D) The destructor
E) None of the above
سؤال
A base class cannot contain a pointer to one of its derived classes.
سؤال
A function object is

A) an instance of a class that has exactly one member function and no member variables.
B) an object of a class that has any number of member functions, but no member variables.
C) an object of a class that overloads the function call operator ().
D) an object that has a member variable that is a pointer to a function.
E) None of the above
سؤال
When arguments must be passed to the base class constructor, they are passed from the derived class constructor's header line.
سؤال
The ________ class destructor is called before the ________ class destructor.

A) base, derived
B) derived, base
C) public, private
D) private, public
E) None of the above
سؤال
An rvalue is

A) a temporary value that cannot be accessed from a different part of the program.
B) the right operand of a binary operator.
C) a value passed as the rightmost parameter of a function.
D) a memory location that is associated with a name that can be used by different parts of the program to access the memory location.
E) None of the above
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/70
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: More About Classes and Object-Oriented Programming
1
C++ permits you to overload the sizeof operator.
False
2
A reason to overload the ________ is to write classes that have array-like behavior.

A) parentheses ( )
B) curly braces { }
C) square brackets [ ]
D) colon : :
E) None of the above
C
3
When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have free access to the other's private members.
False
4
C++ requires that a copy constructor's parameter be

A) an integer data type.
B) a floating-point data type.
C) a pointer variable.
D) a reference to an object.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
5
When a class contains a pointer to dynamically allocated memory, it a good idea to have the class overload the assignment operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
6
Each object of a class has its own copy of the class's

A) static member variables.
B) instance member variables.
C) static member functions.
D) All of the above
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
7
A good reason for overloading an operator is to enable it to

A) outperform its C language counterparts.
B) be used with types defined by the programmer.
C) operate on more operands than in its standard definition.
D) operate on no operands.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ________ operator may be used to assign one object to another.

A) =
B) ==
C) <>
D) &
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
9
You can overload the conditional operator to make it function as an unconditional operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
10
If a function f is a friend of a class A, and the class A is a friend of a class B, then the function f is able to access private members of B.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
11
A static member variable can be used when there are no objects of the class in existence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
12
By default, when an object is assigned to another, each member of one object is copied to its counterpart in the other object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
13
When a class contains a pointer to dynamically allocated memory, it is a good idea to equip the class with

A) a dynamically allocated constructor.
B) a copy constructor.
C) a static constructor and an overloaded comparison operator.
D) an inline constructor.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
14
If you do not furnish a(n) ________, an automatic memberwise copy will be performed when one object is assigned to another object.

A) overloaded constructor function
B) overloaded assignment operator
C) default constructor function
D) overloaded copy operator
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
15
It is a good idea to make a copy constructor's parameters ________ by specifying the ________ keyword in the parameter list.

A) inline, inline
B) static, static
C) constant, const
D) global, glob
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
16
The process of having a class contain an instance of another class is known as

A) object overloading.
B) operator overloading.
C) object composition.
D) dynamic composition.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
17
If you overload the prefix ++ operator, the postfix ++ operator is automatically overloaded also.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
18
When you overload the << operator, you must also overload the >> operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
19
C++ allows you to overload

A) compiler errors.
B) preprocessor directives.
C) operators and functions.
D) undefined variables.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
20
A(n) ________ member variable may be accessed before any objects of the class have been declared.

A) private
B) public
C) inline
D) static
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
21
A member function that is declared ________ cannot use the this pointer.

A) private
B) public
C) static
D) inline
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
22
If a member variable is declared ________, all objects of that class share access to that variable.

A) static
B) dynamic
C) inline
D) default
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
23
A lambda expression is

A) an expression whose value can only be assigned to a local variable.
B) used by the C++ compiler to check the types of other expressions.
C) a class derived from a function object.
D) an object of a class whose only member is the function call operator.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
24
The library function move() can be used to

A) transfer ownership of a managed object from one unique_ptr object to another.
B) move the contents of a dynamically allocated block of memory to another address.
C) move the contents of any block of memory to another address.
D) make a raw pointer point to a different memory location.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
25
If an rvalue reference refers to a memory location, that memory location becomes an lvalue.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
26
________ members of a base class are never accessible to a derived class.

A) Public
B) Private
C) Protected
D) A, B, and C
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
27
A member function of a derived class may not have the same name as a member function of a base class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
28
When you derive a class from an existing class, you

A) can add new data, but cannot add new functions.
B) can add new functions, but cannot add new data.
C) can add both new data and new functions.
D) must add both new data and new functions.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
29
________ allows us to create new classes based on existing classes.

A) Polymorphism
B) Inheritance
C) Function overloading
D) The copy constructor
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
30
It is possible to declare an entire class as a friend of another class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
31
A derived class may become a base class, if another class is derived from it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
32
Some C++ operators cannot be overloaded by the programmer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
33
A ________ function is not a member of a class, but it has access to the private members of the class.

A) static
B) constructor
C) destructor
D) friend
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
34
The ________ class constructor is called before the ________ class constructor.

A) base, derived
B) derived, base
C) public, private
D) private, public
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
35
A derived class may not have any classes derived from it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
36
In the statement class Car:public Vehicle, which is the base class?

A) Car
B) Vehicle
C) public
D) class
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
37
In an inheritance situation, you can't pass arguments to a base class constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
38
A situation in which every object of a class A has a pointer to an object of a class B, and the objects of the class B may outlive objects of class A, is called

A) a has-A relation.
B) aggregation.
C) composition.
D) an is=A relation.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
39
Arguments are passed to the base class destructor function by the ________ class ________ function.

A) derived, constructor
B) derived, destructor
C) base, constructor
D) base, destructor
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
40
A static member function can be called independently of any object of the class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
41
In an inheritance situation, the new class that you create from an existing class is known as the

A) derived class.
B) inheritee.
C) child class.
D) both A and C
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
42
To overload the + operator, you would write a function called

A) overload +.
B) operator +.
C) function +.
D) operator.overload(+).
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
43
A(n) ________ is a special function that is called whenever a new object is created and initialized with data from another object of the same class.

A) destructor
B) static function
C) copy constructor
D) assignment function
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
44
In C++, if you overload the < operator, you must also overload the > operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
45
The this pointer is automatically passed to static member functions of a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
46
If you do not furnish a(n) ________ for a class, a default will be provided for you by the compiler.

A) copy constructor
B) constructor
C) assignment operator
D) All of the above
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
47
A constructor that takes a single parameter of a type other than its class is called a convert constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
48
When overloading the operator ++, ________ is used to distinguish preincrement from postincrement.

A) a parameterless data type
B) the keyword void
C) a dummy integer parameter
D) the placeholder [ ]
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
49
Object composition is useful for creating a ________ relationship between classes.

A) friend
B) static
C) has-a
D) conditional
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
50
The base class's ________ affects the way its members are inherited by the derived class.

A) name
B) return data type
C) access specification
D) both A and B
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
51
You may overload any C++ operator, and you may use the operator function to define non-standard operators, such as @ and ^.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
52
A static member function cannot be called if no objects of the class exist.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
53
When you redefine the way a standard operator works when it is used with class objects, you have ________ the operator.

A) reassigned
B) reformatted
C) overloaded
D) overwhelmed
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
54
An ________ operator can work with programmer-defined data types.

A) inline
B) unconditional
C) overloaded
D) undefined
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
55
Protected members of a base class are like ________, with the exception that they may be accessed by derived classes.

A) constructor functions
B) static members
C) private members
D) public members
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
56
When you overload an operator, you cannot change the number of operands taken by the operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
57
The this pointer is a special built-in pointer that is automatically passed as a hidden argument to all instance member functions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
58
The structure member selector operator . cannot be overloaded.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
59
To dereference an object pointer and access one of the object's members, use the

A) -> operator.
B) <> operator.
C) dot operator.
D) & operator.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
60
The ________ is a special built-in pointer that is available to a class's instance member functions.

A) overloaded -> operator
B) this pointer
C) &constructor pointer
D) ~destructor *ptr
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
61
The base class access specification can be viewed as a filter that base class members must pass through when becoming inherited members of a derived class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
62
In the statement class Car:protected Vehicle, which is the derived class?

A) Car
B) Vehicle
C) protected
D) The answer cannot be determined from the information given.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
63
In the statement class Car:protected Vehicle, what is being protected?

A) Derived class functions
B) Base class members
C) Derived class data
D) Future inherited classes
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
64
An lvalue is

A) a value of type long.
B) a memory location that is associated with a name that can be used by different parts of the program to access the memory location.
C) An expression denoting a value that appears as the left operand of a binary operator.
D) a value of type long returned from a function.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
65
________ is commonly used to extend a class, or to give it additional capabilities.

A) Inheritance
B) Privacy
C) The constructor
D) The destructor
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
66
A base class cannot contain a pointer to one of its derived classes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
67
A function object is

A) an instance of a class that has exactly one member function and no member variables.
B) an object of a class that has any number of member functions, but no member variables.
C) an object of a class that overloads the function call operator ().
D) an object that has a member variable that is a pointer to a function.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
68
When arguments must be passed to the base class constructor, they are passed from the derived class constructor's header line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
69
The ________ class destructor is called before the ________ class destructor.

A) base, derived
B) derived, base
C) public, private
D) private, public
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
70
An rvalue is

A) a temporary value that cannot be accessed from a different part of the program.
B) the right operand of a binary operator.
C) a value passed as the rightmost parameter of a function.
D) a memory location that is associated with a name that can be used by different parts of the program to access the memory location.
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 70 في هذه المجموعة.