NEW
Font size
WorksheetsDesign Patterns-Introduction-Session-1
Total questions: 11
Worksheet time: 9mins
Which of these data structures is LIFO?
Stack
Queue
Binary Tree
Double linked list
It use pointer to link nodes.
Variable
Linked List
Pointer
Trees
It is a measure of how well a computer algorithm scales as the amount of data involved increases.
Big logN Notation
Big X Notation
Big O Notation
When a class is derived from a base class it gets access to:
Private
Protected
Private and Protected
Protected and Public
Private, Protected and Public
In a class the access specifiers are _______ by default:
Private
Protected
Public
What does the word const do when placed at the end of a member function in a class?
It is required for C++
States the return type is constant
States the input arguments are constant
States the member variables will not change
None of the above
When class B is inherited from class A, what is the order in which the destructors are called.
Class A first Class B next
Class B first Class A next
Class B's only as it is the child class
Class A's only as it is the parent class
What does the word virtual do when placed in front of a member function in C++?
Forces derived classes to define the function to compile.
Allows derived classes, not required, to define the function.
Does not place the function in text segment if it is not called.
None of the above.
What happens if the word static is placed in front of a member function in C++?
The member function can be called even if we do not create an instance of the class.
It places the member function in the static part of memory
It will cause an error and the program will not compile.
None of the above.
