Knowledge Check 3 Reviewer

A visually engaging illustration depicting key object-oriented programming concepts like classes, objects, inheritance, and polymorphism, featuring a modern and clean design with vibrant colors that attract learners.

Master Object-Oriented Programming

Test your knowledge of object-oriented programming concepts with this comprehensive quiz designed for learners at all levels. Dive into questions that cover essential topics such as classes, objects, inheritance, and polymorphism.

Enhance your understanding with:

  • 61 thoughtfully crafted questions
  • Multiple-choice format for easy answering
  • Insights into programming methodologies
61 Questions15 MinutesCreated by CodingMaster42
It is the process of formulating general concepts by extracting common properties of instances.
Class
Polymorphism
Abstraction
Instantiation
It is an abstraction of its instances.
Class
Object
Instance
Identifier
Class members refer to the following:
Class
Methods
None of the above
All of the above
_____ members are variables and methods belonging to a class while _____ members are variables and methods belonging to objects.
Instance; static
Static; instance
Private; public
Public; private
Private, public and protected are called?
Objects
Classes
Access Modifiers
Data Editors
Is one of the best programming methodologies because it defines both the data type and the function that can be applied to it.
Object-Oriented Programming
Debugging
Constructionist Design Methodology
Agile Unified Process
It is the process of defining essential concepts while ignoring inessential details.
Encapsulation
Instantiation
Classification
Abstraction
_____ Abstraction separates the object from the interface from the implementiation, _____ abstraction allow programming langages to have constructs that 'gift wrap very complex and low level instructions into instructions that are much more readable, and _____ abstraction allows OOP langauges to take the concept of abstraction even further and treat programming constructs as discrete objects.
Data; functional; object
Data; object; functional
Functional; data; object
Object; data; functional
It is the process of hiding an object's implementation from another object, while presenting only the interfaces that should be visible.
Encapsulation
Instantiation
Classification
None of the above
_____ are methods that alter the state of an object, ______ are methods that return information about the state of an object.
Getters; setters
Setters; getters
Interaction and communication with other objects is allowed through messaging.
True
False
A/n _____ is a self-contained entity with attributes and behaviors.
Class
Instance
Index
Object
Because of the _____ access modifier, members of the same class, subclasses and friend functions may access certain features of the Sample class.
Public
Private
Protected
Default
Because of the _____ access modifier, features of the Sample class can only be accessed from within the class itself and from the friend functions.
Public
Private
Protected
Default
Because of the _____ access modifier, all classes may access its members of the Sample class..
Public
Private
Protected
Default
It is called when an object is created using the new operator or any other process as these methods set the initial state of an object.
Instructor
Constructors
Initializer
Access Modifier
Called by using the delete operator as this method de-initializes the state of an object.
Destructors
Destroyers
Deleters
Deallocators
_____ is the ability to derive new classes from existing ones.
Instantiation
Calling
Pointers
Inheritance
A _____ inherits the variables and methods of the ______, and may add new variables and methods.
Base class (“parent class”); derived class (“child class”)
Derived class (“child class”); base class (“parent class”)
____ is a reference to the current object and can be used to distinguish instance variables from local variables.
This
That
There
Pointer
It invokes all the constructors in the inheritance hierarchy.
Constructor invoking
Constructor binding
Constructor chaining
Constructor linking
_____ is the process of declaring methods with the same name but different input parameter types.
Method Overloading
Method Input
Method Construction
Method Abstraction
The process of using the same name with different function signatures is known as _____.
Function overloading
Method overloading
Function construction
Function abstraction
It is an object's ability to behave different depending on its type
Polymorphism
Encapsulation
Instantiation
Classification
It allows a derived class to redefine methods of the same name from the super class.
Method Overloading
Method Chaining
Method Overriding
Method Derivation
An overriden method MUST have the following:
The same name
The same number and type of parameters
The same return type
All of the above
Both constructors and destructors can be declared as virtual. The derived class then overrides the base class.
The statement is true
Only constructors
Only destructors
Both cannot be declared
_____ is a template with at least partial implementation that other subclasses are supposed to follow. They are not by themselves suitable for instantiation.
C++ class
Class
Abstract class
None of the above
Here one derived class can call more than one base class.
Inheritance
Abstraction
Overloading
Multiple inheritance
This mechanism can be implemented to avoid ambiguity.
Overloading
Overriding
All of the above
None of the above
These are user-defined data type, are collections of variables referred to by a single name and can be of different data types.
Enumeration
Structures
Arrays
Pointers
These are user-defined data type, consists of a set of named constants.
Enumeration
Structures
Arrays
Pointers
Which operator/s is/are used to connect structure variables with structure elements?
.(dot)
->
All of the above
None of the above
These are the building blocks of a C++ program.
Class
Object
Functions
Index
Function declaration is also known as?
Abstraction
Instantiation
Classification
Prototyping
This is used as the return type if the function not returning any value.
Void
Int
_____ variables are available only within the function in which they are declared, and only within the block in which they are declared.
Local
Global
Private
Protected
_____ variables Variables are available only within the function in which they are declared, and only within the block in which they are declared.
Local
Global
Private
Protected
A type of local variable which can only be accessed from the function in which it was declared.
Dynamic
Free
Local
Static
It is is a sequence of either objects or primitives, all of the same type and packaged together under one identifier name.
Class
Array
Pointer
Function
To refer to a particular element, specify the:
Array name
Position
All of the above
None of the above
The first element in an array is:
Array[n]
Array[1]
Array[0]
None of the above
For multi-dimensional arrays, the column is specified before the row as shown: array [column][row]
True
False
_____ storage creates and destroys objects automatically at the beginning and end, respectively, of a function or block.
Automatic
Static
Free
None of the above
_____ storage creates and destroys objects automatically at the beginning and end, respectively, of a function or block.
Automatic
Static
Free
None of the above
_____ storage contains the memory of objects until they are explicitly deleted.
Automatic
Static
Free
None of the above
It is a C++ library of container classes, algorithms and iterators; it provides many of the basic algorithms and data structures of computer science.
Standard Template Laboratory
Standard Template Library
Integrated Development Environment
None of the above
It is a container that may be used for storing data instead of arrays.
Vector
Array
Memory
Pointer
Using vector instead of a pointer-based array can avoid numerous potential memory problems.
True
False
It is an object that is used to access members of the container classes, and can be used in a similar mannter to pointers as it allows a programmer to traverse through all the elements of a collection, regardless of its specific implementation.
Pointer
Array
Iterator
Vector
Which of the following statement/s is/are TRUE about the problems with pointer-based arrays?
C++ does not check whether subscripts fall outside the range of an array.
Two arrays can be compared with equality or relational operators.
One array can be assigned to another using the assignment operators.
All statements are true.
The std::vector is a data structure with conguous memory locations. Which of the following state/s about std::vector is/are FALSE?
Is used when data must be sorted and easily accessed
Does not have random access like arrays
Uses the subscript operator []
All statements are FALSE.
Pointers can be manipulated like variables, but must be manipulated carefully as they can produce some unexpected results.
True
False
Character strings are arrays of characters and always end in null (/0).
Yes
No
Depends on the context
Indeterminable
In using pointers, utilize the <_____> library to facilitate a number of character manipulations in your programs.
String
Math
Cmath
Cstring
To access individual variables with a pointer, the _____ operator is used.
->
()
{}
[]
*Ptr is the _____, the _____ is created with the & operator, and _____ is revealed with the * operator.
Pointer name; pointer address; value stored at a particular address
Value stored at a particular address; pointer name; pointer address
Pointer address; value stored at a particular address; pointer name
Pointer name; value stored at a particular address; pointer address
Pointers to arrays point to the first element of the array by default, unless they are subscripted or otherwise redirected.
True
False
Use _____ to allocate memory and _____ to deallocate memory.
Delete; new
*; &
&; *
New; delete
It is an error condition that is created when an object is left on the heap with no pointer variable containing its address.
Stack Overflow
Buffer Overflow
Syntax Error
Memory Leak
 
 
{"name":"Knowledge Check 3 Reviewer", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of object-oriented programming concepts with this comprehensive quiz designed for learners at all levels. Dive into questions that cover essential topics such as classes, objects, inheritance, and polymorphism.Enhance your understanding with:61 thoughtfully crafted questionsMultiple-choice format for easy answeringInsights into programming methodologies","img":"https:/images/course3.png"}
Powered by: Quiz Maker