Skip to content
VUBuddy

CS304 Midterm Past Paper 1

Object Oriented Programming PDF 66 KBUpdated 23 Oct 2026
Midterm past paper CS304 Midterm Past Paper 1 PDF 66 KB
vubuddy.com
Type
Midterm past paper
Course
CS304 Object Oriented Programming
Size
PDF 66 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 66 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 4. Download the file for all 4 pages.

MIDTERM EXAMINATION

SPRING 2006 CS304 – object oriented programming (Session - 1 ) Marks: Time: 120min

Student Name:

Center Name/Code:

Exam Date:

  1. This examination is closed book, closed notes, closed neighbors.

Q2. Answer all questions.

  1. There is no choice.
  2. You will have to answer all questions correctly in this examination to get the maximum possible marks.

Q4. Examination also consists of multiple-choice questions. Choose only one choice as your answer.

  1. If you believe that two (or more) of the choices are the correct ones for a particular question, choose the best one.
  2. 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.

Question Marks Total

Q1. ( Marks: 2 )

int *p=new int;

In the code given above, memory is allocated during program:

compilation linking execution loading

Q2. The proper syntax to free the memory allocated to array a of five objects is (2 marks)

free(a,5); delete(a,5); delete a; delete [] a;

Q3. What methods would you add to make this class declaration very useful? (6 marks)

Class Cat

int GetAge() const; private: int itsAge;

Q4. Write a class Coordinate that performs the mathematical operations (Addition and Multiplication) on its coordinates with the help of operator overloading. (18 marks)

Class Coordinate should have the following Private data members

  1. xCord

Q2. yCord

  1. Write a parameterized constructor to initialize its coordinates/data members.
  2. Write member functions to Overload the following Operators and Display the Results after Operations.
  1. +
  2. *

Q5. Create a class named Employee, its data members are (17 marks)

i. empName ii. empDesignation iii. empSalary

a) Create the object of this class using parameterized constructor in order to initialize all the three data members i.e. empName, empDesignation and empSalary b) Write a member function of this class named increment (), this function will calculate the incremented salary of the employee. In increment function user will enter the increment amount in the current salary of the employee and displays the incremented salary after the addition of increment. c) write the getter and setter functions for the data members of this class

Q6. A system call

( Marks: 2 ) - Please choose one

Is an entry point into the kernel code

Allows a program to request a kernel service

Is a technique to protect I/O devices and other system resources

All of the these

Q7. ( Marks: 2 )

- Please choose one

Logical address is generated by,

CPU

Compiler

Hard disk

None of the these

All CS304 files →
CS304 Object Oriented Programming All CS304 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.