CS301 MCQs lecture 1 to 20-converted.pdf

Verified academic study resource for CS301 (Data Structures) under the Computer Science at Virtual University of Pakistan. This PDF document (Official Lecture Handouts & Highlighted Notes) covers Complete Course Handouts (Lectures 1 to 45) spanning approximately 450 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS301 – Data Structures
Faculty
Computer Science
Format
PDF
Type
Handout
Coverage
Complete Course Handouts (Lectures 1 to 45)
Tags
MCQ, LECTURE

Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS301 handouts.

What this file covers — CS301 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download CS301 MCQs lecture 1 to 20-converted.pdf for free?

You can preview and download "CS301 MCQs lecture 1 to 20-converted.pdf" (CS301 PDF, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301-mcqs-lecture-1-to-20-converted-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS301 file?

This document covers Complete Course Handouts (Lectures 1 to 45) across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS301 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS301 solved past papers and handouts verified for 2026 exams?

Yes. All CS301 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

CS301 MCQs lecture 1 to 20
Node in a binary tree can have maximum ________ child node(s).
Two children

Similarly, log2   64 = 6, because 26 =64
Level-order traversal for Binary Search Tree can be implemented,
_______________.

The algorithm can be implemented as follows in C++, Java, and
Python: C++

What will be the preorder traversal of the given tree?

45 25 75 15 35

We allocate memory dynamically by using _______ operator.

New

Generally there is/are _________ case(s) to delete a node from
BST.
2

Analyze the given code carefully and identify which type of binary
tree traversal this is :void traversal (TreeNode<int>* treeNode){
if( treeNode != NULL ) { traversal (treeNode->getLeft()); cout <<
*(treeNode->getInfo())<<" "; traversal (treeNode->getRight()); }}

Postwar

Elements in a queue data structure are added from______ and
removed from ______

Rear and font end

Consider an array int x[] = {14,15,4,9,7,18,3}. Which statement
will be used to set first number of the list into the root node.

setInfo -> root( &x[0] );

For a perfect binary tree of height 4, what will be the sum of highest
of node

26

If Ahmed is cousin of Ali and Ali is cousin of Asad then Ahmed is also
cousin of Asad. This statement has the following property.
Transitivity

Suppose there are 100 elements in an equivalence class, so initially
there will be 100 trees,the collection of these trees is called.

Forest

The percolate Down procedure will move the smaller value and bigger
value.

Up,down

For a perfect binary tree of height h, having N nodes, the sum of
height of nodes is

N-h-1

If we want to find median of 50 elements, then after applying
builtHeap method, how Manytime deleteMin method will be called?

25

The Expression

If(!heap-> isEmpty () )

Check

Heap is not empty

Which of the following heap method increase the value if Key at
position’p’ by the Amount’delta’?

Increase Key(p,delta)

Given the values are the array representation of heap;12 23 26 31 34
44 56 64 78 100 What is the 5th smallest element in the given heap?

34

Which of the following data structure linear type

All of above

in a program a reference variable with name ‘x’can be declared as

int &’x;

Object (object oriented by pointers)are called anonymous object

Friend

in the perspective each process divided into……..section

4

In tree the search operation is……..as compared to the linked list

Very fast

Level order transversal for binary tree search can be
implemented………

Only through non recursive method

……….is an area in computer memory that is used to allocate memory
dynamicall

Stock

Suppose we want to create the right child of ‘p’and set the value x in
it.which of the following statement is correct in this operation

Set Right (x,p)

In level order traversal for binary search tree of each level we visit
node in……..order

Right to left

We can calculate the……..of a subtree counting the level from the
bottom

height
A ……….is a tree in which every level except possibly the last is
completely filled

Complete binary tree

Which of the following calling method does not change the original
value of variable passed to a function as an argument?
Call by passing as value
What is the maximum of recursive calls a function may make?
n (where n is the argument)

   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?

x is still 0, but y is now 2.

Write in postfix form 5 * (9 - 7)

597-*

Which of the following is NOT true regarding the maze generation?

Remove a randomly chosen wall if the cells it separates are already in
the same set

An array x of 100 integers is declared as

int x[100];

Local variables defined inside function body are ________
automatically at the end of function execution.

Created

Which of the following statement is NOT correct regarding Table ADT?

A table consists of deveral columns known as entities

In doubly linked list there is/are _______ pointer/s in each node.

Two

"new int[11]" will allocate memory for ________ integers.

11

If a tree has 20 edges/links, then the total number of nodes in the tree
will be:

21

In the statement int& a=b;

b hold the address of variable a

Which of the following is NOT an open addressing technique to resolve
collisions?

Double hashing

Consider the function X as under
int X (int& Value)
{
return Value;
}
Now a and b are integers in a calling function. Which one of the
following is a valid call to the above function X?

a = X(*b);

For a perfect binary tree of height 4, What will be the sum of hights of
nodes?

26

If unions are done by weight (size), the depth of any element is never
greater than

log2 n

Which of the following statement is NOT true for reference variable?

References can be uninitialized.

The tree data structure is a

Non-linear data structure

In singly linked list a node consists of two parts:

Object and pointer

The simplest case in a BST to delete a node is:

When the node, that is to be deleted is a leaf node

A binary tree with 24 internal nodes has ________ external nodes.

25

a * (b+c)-d is an example of ________ expression.

infix

given the values are the array representation of heap:
12 23 26 31 34 44 56 64 78 100
If we perform 4 deleteMin operations, the last element deleted is
________.

31

In ________, a programmer uses two pointers in the node, i.e. one to
point to next node and the other to point to the previous node.

Linked list

Trying to remove an element from an empty stack is called ________ .

Underflow of stack

For reference variables, ________ sign is used.

ampersand

Which property of equivalence relation is satisfied if we say:
Ahmad R(is related to) Ahmad

Reflexivity

Suppose there is an image segmented into pixels. Each pixel has
________ neighbour(s).

8

The most difficult case for deleting a node from Binary Search Tree is
when the node to be deleted ________.

More CS301 files

All CS301 files · Midterm Prep 2026 · MCQs Bank