Data Structures - CS301 Spring 2004 Mid Term Paper Session 1-edited.pdf
Verified academic study resource for CS301 (Data Structures) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 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
- Type
- Midterm
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
- Tags
- MIDTERM
Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS301.
What this file covers — CS301 syllabus roadmap
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
Frequently asked questions
Where can I download Data Structures - CS301 Spring 2004 Mid Term Paper Session 1-edited.pdf for free?
You can preview and download "Data Structures - CS301 Spring 2004 Mid Term Paper Session 1-edited.pdf" (CS301 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/data-structures-cs301-spring-2004-mid-term-paper-session-1-edited-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 Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), 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
WWW.VUPages.com
WWW.VUTUBE.EDU.PK
http://forum.vupages.com
Largest Online Community of VU Students
H
MIDTERM EXAMINATION
Total Marks:75
SEMESTER SPRING 2004
CS301-DATA STRUCTURE Duration: 60min
Instructions
Please read the following instructions carefully before attempting any question:
1. The duration of this examination is 60 Mins.
2. This examination is closed book, closed notes, closed neighbors; any one found cheating will get no
grade.
3. Unless stated otherwise, all questions carry a single mark.
4. Do not ask any questions about the contents of this examination from anyone.
a. If you think that there is something wrong with any of the questions, attempt it to the best of your
understanding.
b. If you believe that some essential piece of information is missing, make an appropriate assumption
and use it to solve the problem.
5. You are allowed to use any development environment like Dev C++ etc.
Question No: 1 Marks: 5
What is the value of the C/C++ expression: 6.2 + 5 / 3
Answer:
6.2+5/3
6.2+1 (As 5 & 3 are integers so result will be in integer, fraction portion will be discard)
7.2
Question No: 2 Marks: 5
What is the value of the postfix expression: 8 6 4 + 3 * + 5 +
Answer:
Input op1 op2 value stack
8 8
6 6
8
4 4
6
8
+ 6 4 10 10
8
3 3
10
8
* 10 3 30 30
8
+ 8 30 38 38
5 5
38
+ 38 5 43 43
Value of Postfix Expression = 43
Question No: 3 Marks: 5
Write an equivalent postfix expression for the infix expression:
6+ (5 - 3 ) * 8
assuming standard precedence for order of operations.
Answer: 6 5 3 - 8 * +
Step No. Symbol Postfix Stack
1 6
2 + 6 +
3 ( 6 +(
4 5 6 5 +(
5 - 6 5 +(-
6 3 6 5 3 +(-
7 ) 6 5 3 - +
8 * 6 5 3 - +*
9 8 6 5 3 - 8 +*
10 6 5 3 - 8 * +
Question No: 4 Marks: 10
A linked list node class is declared as follow:
class Node
{
public:
Node(const string& s, Node* ptr)
: info(s), next(ptr)
{}
private:
string info;
Node* next;
};
Write a function that changes every ’t’ that occurs as the first letter of a word to a ’b’. No other letters
should change. For example, ("tin", "tile", "ant", "saint", "tot") should be changed to ("bin", "bile",
"ant", "saint", "bot")
void change(Node* list)
// post condition: all t’s that occur as first letters of a
// word in the list nodes are changed to b’s
{
Answer:
Void change(Node * list)
{
temp = list;
While(temp !=NULL)
{
If (temp->info[0]==’t’)
Info[0]=’b’;
Temp=temp->next;
} //end of while
}
Question No: 5 Marks: 15
The tree below is a binary search tree.
a) What is the preorder traversal of the tree?
b) Add nodes containing “black” and “panda” so that the tree remains a search tree. Add “black”
first. Draw the nodes attached to the tree diagram above.
c) Draw a search tree in which “teddy” is at the root of the tree, and the root’s left child is “polar”
(include all other nodes from the tree in the diagram above, these other nodes can occur in any
order in the tree you draw.)
Answer
a) grizzly, brown, polar, koala, teddy
b) grizzl
/ \
brown polar
/ / \
black koala teddyMore CS301 files
- CS301 - Midterm Paper 2 by Waqar Solved by Hadi.pdf (PDF · Midterm)
- CS301 - Midterm Paper 3 by Waqar Solved by Hadi.pdf (PDF · Midterm)
- CS301 Current Midterm 2022 Papers.pdf (PDF · Midterm)
- CS301 Grand Quiz file for Mid Term Prepratin by VU Stars.pdf (PDF · Midterm)
- CS301 Grand Quiz file for Mid Term Prepratin by VU Stars.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 1 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 3 SOLVED BY TEAM HADI.pdf (PDF · Midterm)
- CS301 MIDTERM FILE 4 SOLVED BY TEAM HADI.pdf (PDF · Midterm)