Skip to content
VUBuddy

CS301 Midterm Past Paper Fall 2003 Session 3

Data Structures PDF 203 KBUpdated 23 Oct 2026
Midterm past paper CS301 Midterm Past Paper Fall 2003 Session 3 PDF 203 KB
vubuddy.com
Type
Midterm past paper
Course
CS301 Data Structures
Size
PDF 203 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 203 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2, 3 of 9. Download the file for all 9 pages.

MIDTERM EXAMINATION · SEMESTER FALL 2003 · CS301-DATA STRUCTURE · Instructions

  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. 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.

  1. You are allowed to use any development environment like Dev C++ etc.

Q1. Marks: 2

Is it possible for a member function of a class to activate another member function of the same class?

  1. No.
  2. Yes, but only public member functions.
  3. Yes, but only private member functions.
  4. Yes, both public and private member functions can be activated within another member function.

Q2. Marks: 2

Consider this class definition: · class quiz · public: · quiz( ); · int f( ); · int g( ) const; · private: · double score;

Which functions can carry out an assignment score=1.0; to the private ember variable score?

  1. Both f and g can carry out the assignment.
  2. f can carry out the assignment, but not g.
  3. g can carry out the assignment, but not f.
  4. Neither f nor g can carry out the assignment

Q3. Marks: 2

In C++, when allocating an array of objects, what constructor is used to initialize all of the objects in the array?

  1. The automatic copy constructor.
  2. The constructor specified at the declaration.
  3. The default constructor.
  4. None of the above.

Q4. Marks: 2

The list abstract data type (ADT) is used to work with ordered or unordered sequence of items such as numbers or strings. What of the following implementation of list ADT is best to answer questions such as " What is the item at position n?"

a. Lists implemented with an array. b. Doubly-linked lists. c. Singly-linked lists.

d. Doubly-linked or singly-linked lists are equally best

Q5. Marks: 5

Consider this function declaration: · void quiz(int i) · if (i > 1) · quiz(i / 2); · quiz(i / 2); · cout << "*";

How many asterisks are printed by the function call quiz(5)?

  1. 3
  2. 4
  3. 7
  4. 8

e. Some other number

Q6. Marks: 2

Suppose T is a binary tree with 14 nodes. What is the minimum possible depth of T?

  1. 0
  2. 3
  3. 4
  4. 5

Q7. Marks: 2

“Entries in a stack are Ordered". What is the meaning of this statement?

  1. A collection of stacks can be sorted.
  2. Stack entries may be compared with the < operation.
  3. The entries must be stored in a linked list.
  4. There is a first entry, a second entry, and so on.

Q8. Marks: 2

Which of the following applications may use a stack?

  1. A parentheses balancing program.
  2. Keeping track of local variables at run time.
  3. In-order traversal of a binary tree.
  4. All of the above.
All CS301 files →
CS301 Data Structures All CS301 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.