cs301-fall-2003-mid-term-paper-session-1.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
PDF
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

  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)

Frequently asked questions

Where can I download cs301-fall-2003-mid-term-paper-session-1.pdf for free?

You can preview and download "cs301-fall-2003-mid-term-paper-session-1.pdf" (CS301 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs301-fall-2003-mid-term-paper-session-1-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
                                            http://forum.vupages.com
                                   WWW.VUTUBE.EDU.PK
                                    Largest Online Community of VU Students

                                            MIDTERM EXAMINATION
                                                                                                 Total Marks:86
                                             SEMESTER FALL 2003
                                           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. Most, but not all, of the examination consists of multiple-choice questions. Choose only one choice as your
      answer.
           a. If you believe that two (or more) of the choices are the correct ones for a particular question,
              choose the best one.
           b. On the other hand, if you believe that all of the choices provided for a particular question are the
              wrong ones, select the one that appears to you as being the least wrong.
  7. You are allowed to use any development environment like Dev C++ etc.

Question No: 1                                                                                        Marks: 2
Given the class declaration

       class MyClass
       {
            public:
            ...
            void Func();
            private:
            int n;
       };

what notation does the body of Func use to assign the value 3 to n?
(a)    n = 3;
(b)    MyClass.n = 3;
(c)    MyClass::n = 3;
(d)    someObject.n = 3;
(d)    It can’t be done–n is private.

Question No: 2                                                                                        Marks: 2

Suppose that the class declaration of SomeClass includes the following function prototype.
      bool LessThan( SomeClass anotherObject );

Which of the following tests in the client code correctly compares two class objects alpha and beta?

(a)    if (alpha < beta)
(b)    if (alpha.LessThan(beta))
(c)    if (LessThan(alpha, beta))
(d)    if (alpha.LessThan.beta)
(e)    if (LessThan(alpha).beta)

Question No: 3                                                                                        Marks: 2

When should you use a const reference parameter?

(a)    Whenever the data type might be many bytes.
(b)    Whenever the data type might be many bytes, the function changes the parameter within     its body, and
       you do NOT want these changes to alter the actual argument.
(c)    Whenever the data type might be many bytes, the function changes the parameter within its body, and you
       DO want these changes to alter the actual argument.
(d)    Whenever the data type might be many bytes, and the function does not change the
       parameter within its body.

Question No: 4                                                                                        Marks: 2

The Bag ADT is like the List ADT. The Bag ADT does not store items in any particular order and it allows
duplicates. Suppose that the Bag class is efficiently implemented with a fixed array with a capacity of
4000. Insert appends the new item at the end of the array. Choose the best description of b’s member
variables size (count of items in the bag) and data (the array that holds the actual items) after we
execute these statements:

       Bag b;
       b.insert(5);
       b.insert(4);
       b.insert(6);

What will be the values of b.size and b.data after the statements?

(a)    b.size is 3, b.data[0] is 4, b.data[1] is 5, b.data[2] is 6
(b)    b.size is 3, b.data[0] is 5, b.data[1] is 4, b.data[2] is 6
(c)    b.size is 3, b.data[0] is 6, b.data[1] is 4, b.data[2] is 5
(d)    b.size is 3, b.data[0] is 6, b.data[1] is 5, b.data[2] is 4

Question No: 5                                                                                  Marks: 2

The operation for removing an entry from a stack is traditionally called:
(a)    delete
(b)    peek
(c)    pop
(d)    remove

Question No: 6                                                                                  Marks: 2

Which of the following stack operations could result in stack underflow?
(a)    is empty
(b)    pop
(c)    push
(d)    Two or more of the above answers

Question No: 7                                                                                  Marks: 5

Consider the following pseudo code:
      declare a stack of characters
      while ( there are more characters in the word to read )
      {
              read a character
              push the character on the stack
      }

       while ( the stack is not empty )
       {
            pop a character off the stack
            write the character to the screen
       }

What is written to the screen for the input “carpets”?
(a)    serc
(b)    carpets
(c)    steprac
(d)    ccaarrppeettss

Question No: 8                                                                              Marks: 2

In the linked list implementation of the stack class, where does the push member function
place the new entry on the linked list?
(a)    At the head
(b)    At the tail
(c)    After all other entries that are greater than the new entry.
(d)    After all other entries that are smaller than the new entry.

Question No: 9                                                                              Marks: 2

More CS301 files

All CS301 files · Midterm Prep 2026 · MCQs Bank