vu cs301 Mid Term - Quiz No.16
vu cs301 Data Structures Quiz
This quiz belongs to book/course code vu cs301 Data Structures of vu organization. We have 40 quizzes available related to the book/course Data Structures. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Mid Term. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 1: Consider the following statements.
(i) A binary tree can contain at least 2L Nodes at level L.
(ii) A complete binary tree of depth d is a binary tree that contains 2L Nodes at each level L between 0 and d,
both inclusive.
(iii) The total number of nodes (Tn ) in a complete binary tree of depth d is 2 d+1 - 1 .
(iv) The height of the complete binary tree can be written as h = log 2 (Tn+1)-1 where Tn is Total number of Nodes.
Which one of the following is correct in respect of the above statements regarding the Binary trees?
(i) A binary tree can contain at least 2L Nodes at level L.
(ii) A complete binary tree of depth d is a binary tree that contains 2L Nodes at each level L between 0 and d,
both inclusive.
(iii) The total number of nodes (Tn ) in a complete binary tree of depth d is 2 d+1 - 1 .
(iv) The height of the complete binary tree can be written as h = log 2 (Tn+1)-1 where Tn is Total number of Nodes.
Which one of the following is correct in respect of the above statements regarding the Binary trees?
(i) and (iii) only
(i), (ii) and (iii) only
(ii) and (iii) only
(ii), (iii) and (iv) only
Question 2: When an operator is used in between two operands this is which type of notation
prefix
postfix
Infix
None of these
Question 3: What will be the valid postfix notation of A+B*C-D
ABC+*D-
ABC*+D-
ABCD+-*
AB+D*C
Question 4: Where does the push member function place the new entry in the array?
data[11]
data[2]
data[1]
data[12]
Question 5: Each entry which points to a null value in a Singly Linked List is known as:-
Node
First Node
Last Node
Head Node
Question 8: Searching an element in an AVL tree take maximum in AVL tree
Log2(n+1) time (where n is no. of nodes
Log2(n+1) -1
1.44 Log2n
1.66 Log2n
Question 9: Here is a small function definition:
void f(int i, int &k)
{
i = 1;
k = 2;
}
Suppose that a main program has two integer variables x and y, which are given the value 0. Then the main program calls f(x,y); What are the values of x and y after the function f finishes?
void f(int i, int &k)
{
i = 1;
k = 2;
}
Suppose that a main program has two integer variables x and y, which are given the value 0. Then the main program calls f(x,y); What are the values of x and y after the function f finishes?
Both x and y are still 0.
x is now 1, but y is still 0.
x is still 0, but y is now 2.
x is now 1, and y is now 2.
Question 10: An effective form of direct marketing today is using the 30-minute television advertising programs for a single product to get instant feedback from customers refers to which of the following concepts?
TV advertising
Infomercials
Home shopping TV
Publicity