Quiz 8 Flashcards

1
Q

In C++, protected members are inaccessible to client and to derived classes, T/F?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

While garbage collector reduces manual memory management, it can cause unpredictable pauses in program execution and negatively impact performance, especially in real-time or performance-critical applications, T/F?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In C++, a function declared with a 0 and the keyword virtual is an abstract function and it cannot be called. It must be overridden in a derived class, T/F?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

C++ offers multiple inheritance using a comma-separated list of base classes, T/F?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Some OOP languages, like Java and C++, allow you to mark methods or classes as ________, which means they cannot be overridden.
Final, friend, virtual, or inline?

A

Final

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In C++, the ________ keyword is a mechanism that allows a class to grant another class or function access to its private and protected members, which are normally hidden from other parts of the program.
Inline, virtual, friend, or final?

A

Friend

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

C++ excludes classes from type checking, T/F?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

All virtual functions in C++ are dynamically bound, T/F?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

________ function in C++ is a function for which the compiler attempts to replace the function call with the function’s code itself, instead of performing the usual process of jumping to the function’s location in memory.
Virtual, final, inline, or friend?

A

Inline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In C++, instead of storing the actual method implementation inside each object, the object has a pointer to a table (vtable) that stores the addresses of dynamically bound methods, T/F?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly