VU CS-301 Online Test Preparation

MCQ's Test For CS-301 Final Term Exams Preparation Virtual University

Try The MCQ's Test For CS-301 Final Term Exams Preparation Virtual University

  • Total Questions10

  • Time Allowed10

CS-301 Final Term Exams Preparation Virtual University

00:00
Question # 1

While joining nodes in the building of Huffman encoding tree if there are more nodes with same frequency, we choose the nodes _______.

Question # 2

Which one is a self-referential data type?

Question # 3

Which one of the following is NOT the property of equivalence relation

Question # 4

If there are 56 internal node in a binary tree then how many external nodes this binary tree will have ?

Question # 5

Suppose we are sorting an array of eight integers using quick sort, and we have just finished the first partitioning with the array looking like this: 2 5 1 7 9 12 11 10 Which statement is correct?

Question # 6

Consider the following infix expression: x – y * a + b / c Which of the following is a correct equivalent expression(s) for the above?

Question # 7

The definition of transitive property is

Question # 8

I have implemented the queue with a linked list, keeping track of a front pointer and a rear pointer. Which of these pointers will change during an insertion into an EMPTY queue?

Question # 9

Each node in a double link list has ,

Question # 10

Let heap stored in an array as H = [50, 40, 37, 32, 28, 22, 36, 13]. In other words, the root of the heap contains the maximum element. What is the result of deleting 40 from this heap

Prepare Complete Set Wise CS-301 Final Term Exams Preparation Virtual University MCQs Online With Answers


Topic Test

00:00

Top Scorers Of CS-301 Final Term Exams Preparation Virtual University MCQ`s Test

  • T
    Tahira Nawaz 26 - Feb - 2023 00 Min 02 Sec 10/10
  • Q
    Qudsia fatima 11 - Feb - 2024 00 Min 35 Sec 10/10
  • J
    Jehanzaib khalil 15 - Aug - 2023 00 Min 48 Sec 10/10
  • E
    Eiza Munawar 22 - Sep - 2022 01 Min 07 Sec 10/10
  • S
    Shabnam Irshad 17 - Aug - 2023 01 Min 18 Sec 10/10
  • A
    Ayesha javaid 02 - Mar - 2023 01 Min 24 Sec 10/10
  • S
    Sana Riaz 11 - Feb - 2024 01 Min 26 Sec 10/10
  • A
    Ayesha Butt 31 - May - 2024 01 Min 46 Sec 10/10
  • U
    Uzair sajid 18 - Feb - 2024 02 Min 12 Sec 10/10
  • R
    Rubab Irfan 22 - Sep - 2022 01 Min 09 Sec 9/10
  • R
    Rabani baloch 07 - Jun - 2024 01 Min 19 Sec 9/10
  • B
    bc210402145 MOHTASHAM JAVED 15 - Aug - 2023 01 Min 44 Sec 9/10
  • A
    Asif Iqbal 15 - Feb - 2024 01 Min 49 Sec 9/10
  • M
    Mehwish Khan 04 - Mar - 2023 02 Min 26 Sec 8/10
  • U
    U Shop 4 All 04 - Oct - 2022 02 Min 37 Sec 8/10

Virtual University CS-301 Chapter 1 Important MCQ's

Sr.# Question Answer
1 The difference between the binary tree and a binary search tree is that:

A. a binary search tree has two children per node whereas a binary tree can have none, one, or two children per node
B. in binary search tree nodes are inserted based on the values they contain
C. in binary tree nodes are inserted based on the values they contain
D. none of these
2 If a complete binary tree has n number of nodes then its height will be
A. Log2(n+1)-1
B. 2n
C. 2n-1
3 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?
A. Both x and y are still 0.
B. x is now 1 but y is still 0
C. x is still 0,but y is now 2
D. x is now1 1 and y is now 2
4 Merge sort and quicksort both fail into the same category of sorting algorithms,What is this category ?
A. O(nlogn) sorts
B. Interchange sort
C. Average time is quadratic
D. None of the given options.
5 Consider the following postfix expression S and the initial values of the variable,
S = A B - C + D E F - + ^ Assume that A=3, B=2, C=1, D=1, E=2, F=3 What would be the final output of the stack?
A. 1
B. 2
C. 0
D. -1
6 Which of the following statement is NOT true about threaded binary tree?
A. Right thread of the right-most node points to the dummy node
B. Left thread of the left-most node points to the dummy node.
C. The left pointer of dummy node points to the root node of the tree
D. Left thread of the right-most node points to the dummy node.
7 Suppose we are sorting an array of eight integers using quick sort, and we have just finished the first partitioning with the array looking like this: 2 5 1 7 9 12 11 10 Which statement is correct?
A. The pivot could be either the 7 or the 9
B. The pivot could be the 7, but it is not the 9.
C. The pivot is not the 7, but it could be the 9.
D. Neither the 7 nor the 9 is the pivot.
8 Consider te following array 23 15 5 12 40 10 7 After the first pass of a particular algorithm, the array looks like 15 5 12 23 10 7 40 Name the algorithm used
A. Heap sort
B. Selection sort
C. Insertion sort
D. Bubble sort
9 A complete binary tree of height ___ has node between 16 to 31.
A. 2
B. 3
C. 4
D. 5
10 While building Huffman encoding tree the new node that is the result of joining two nodes has the frequency.
A. Equal to the small frequency
B. Equal to the greater
C. Equal to the sum of the two frequencies
D. Equal to the difference of the two frequencies

Test Questions