CS301 Midterm Solved MCQs with References Set 2 by Moaaz
- Type
- Midterm past paper
- Course
- CS301 Data Structures
- Size
- PDF 347 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
Preview text
Text from pages 2, 3, 4 of 23. Download the file for all 23 pages.
Spring 2010
Q1. (1 marks)
Correct answer: True (Page 101)
Q2. The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should (1 marks)
Correct answer: Increase the hard disk space (Page 5)
Q3. Consider the function X as under (1 marks)
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.
Correct answer: a = X (&b) ;
Here function argument passing by reference method is used, so when we call a function we will give the variable reference as parameter.
Q4. In the call by value methodology, a copy of the object is passed to the called function. (1 marks)
Correct answer: True (Page 202)
Q5. The tree data structure is a (1 marks)
Correct answer: Non-linear data structure (Page 112)
Q6. When should you use a const reference parameter? (1 marks)
Correct answer: Whenever the parameter has huge size, the function changes the parameter within its body, and you do NOT want these changes to alter the actual argument.
Declaring a parameter as a const simply means that the function can’t change the value of its parameters.
Q7. Here is the start of a C++ class declaration: (1 marks)
class foo
public: void x(foo f); void y(const foo f); void z(foo f) const;
Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function?
Correct answer: Two of the functions can alter the private member variables of the object that activates the function.
Only the x and y can alter the private member variable of the foo class object. Last Option is more correct but not exact. In the last option the two function name are not mentioned
Q8. What is the maximum depth of recursive calls a function may make? (1 marks)
Correct answer: There is no fixed maximum
Q9. Suppose n is the number of nodes in a complete Binary Tree then maximum steps required for a search operation are, (1 marks)
Correct answer: Log2 (n+1) -1 (Page 139)
Q10. In the linked list implementation of the stack class, where does the push member function places the new entry on the linked list? (1 marks)
Correct answer: At the head (Page 53)
Q11. Suppose we have a circular array implementation of the queue class, with ten items in the queue stored at data[2] through data[11]. The CAPACITY is 42, i.e., the array has been declared to be of size 42. Where does the push member function place the new entry in the array? (1 marks)
Correct answer: data[12]
Q12. The expression AB+C* is called? (1 marks)
Correct answer: Postfix expression (Page 70)
Q13. _________ is a binary tree where every node has a value, every node's left subtree contains only values less than or equal to the node's value, and every node's right subtree contains only values that are greater then or equal? (1 marks)
Related CS301 files
All CS301 files →- CS301 Midterm Important Questions 2024 Midterm PDF 83 KB
- CS301 Midterm Solved Subjective with References Set 2 by Moaaz Midterm PDF 250 KB
- CS301 Midterm Solved Subjective with References by Moaaz and Awais Midterm PDF 310 KB
- CS301 Highlighted Handouts Highlighted PDF 15 MB
- CS301 Quiz 1 by Lucky Quiz PDF 919 KB
- CS301 Midterm MCQs File 2 by Waqas Qureshi Midterm PDF 5 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.