A ________ is blue print that defines certain characteristics and behavior. It is simply a representation of different types of objects.
Class
15
A function can have _____ inside the parenthesis
Arguments/Parameters
5
A function that changes the values of an object's attributes in a Class is also known as a:
Setter
10
Given the following Banana class in C++. Create a new Banana object properly
Banana sample("yellow");
25
When struct is used instead of the keyword class means, what will happen in the program?
access is public by default
10
In C++ what the following command does: delete a;
Free memory allocated for the variable
10
What is the output of the following program segment?
10
15
Specify whether the statement below is valid or invalid.
Invalid
15
What advantage does a linked list have over an array?
A linked list is not of a fixed size
10
How many null pointers exists in a circular linked list?
0
5
The object in the image resembles which data structure
Linked List
5
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
ABCD
5
If the sequence of operations - push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop are performed on a stack, the sequence of popped out values
2,2,1,1,2
10
In linked list implementation of a queue, the important condition for a queue to be empty is?
FRONT is null
10
What output is displayed after the following segment of code executes:
10 an infinite number of times. top() simply copies the top element of the stack. Use push() to remove an element from the stack.
25
Make the following function return the following number in the fibonacci sequence