- Type
- Midterm past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 66 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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:
- This examination is closed book, closed notes, closed neighbors.
Q2. Answer all questions.
Q4. Examination also consists of multiple-choice questions. Choose only one choice as your answer.
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
- xCord
Q2. yCord
- +
- *
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
Related CS304 files
All CS304 files →- CS304 Midterm Short Notes by Syed Abdul Ahad Midterm DOCX 44 KB
- CS304 Midterm Past Paper 2 Midterm PDF 61 KB
- CS304 Midterm Past Paper 4 Midterm PDF 23 KB
- CS304 Midterm Solved Papers by Moaaz Midterm ZIP 545 KB
- CS304 Highlighted Handouts Lectures 1-45 Set 2 Highlighted PDF 7.7 MB
- CS304 Solved Quiz by Riz Mughal Quiz PDF 2.1 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.