Cs 301 Midterm Important Repeated Mcqs Quiz

Cs 301 Midterm Important Repeated Mcqs Online Quiz

1 / 25

Traversing a binary tree can only be done using

2 / 25

The expression if ( ! heap->isEmpty() ) checks

3 / 25

In a min heap the parent node has key smaller than or equal to

4 / 25

Consider a binary tree, represented by the following array: A,B,C,D,E,F,G,I Is it a
strictly binary tree ?

5 / 25

When a complete binary tree represented by an array then if right child is at
position 5 then left child will be at position _____

6 / 25

An expression tree will always be a,

7 / 25

If there are N external nodes is a binary tree then what will be the no. of the internal
nodes in this binary tree?

8 / 25

See the below code and fill the appropriate answer for? void fastInorder(TreeNode* p) {
while((p=nexInorder(p)) != ? ) cout p->getInfo(); }

9 / 25

Whenever we call a function, the compiler makes a stack, the top element of the stack
is _____ of the function.

10 / 25

The principal benefit of a linked list over a conventional array is that the order of the linked
items may be_____ from the order that the data items are stored in memory.

11 / 25

A queue is a ________data structure, whereas a stack is a ________data structure.

12 / 25

To create a _________ we link the last node with the first node in the list.

13 / 25

Local variables of a function are stored in,

14 / 25

A template is a function or class that is written with a __________data type.

15 / 25

it will be efficient to place stack elements at the start of the list because insertion and removal
take _______time.

16 / 25

Which of the following operations returns top value of the stack?

17 / 25

In the linked list implementation of the stack class, where does the push member function places
the new entry on the linked list?

18 / 25

Stack and Queue can be implemented using _______,

19 / 25

Local variables of a function are stored in,

20 / 25

Which boolean expression indicates whether the numbers in two nodes (p and q) are
the same. Assume that neither p nor q is null.

21 / 25

Which of the following is known as "Last-In, First-Out" or LIFO Data Structure?

22 / 25

To create a _________ we link the last node with the first node in the list.

23 / 25

Which of the following operations returns top value of the stack?

24 / 25

A kind of expressions where the operator is present between two operands called
________expressions

25 / 25

When an executable program run, it is loaded in the memory and becomes a_______.

Your score is

The average score is 0%

0%