0% found this document useful (0 votes)
21 views1 page

Internal Paper

This document outlines the internal examination for Object Oriented Programming for the semester 2 at CVM University, scheduled for May 15, 2023. It includes instructions, a series of questions related to C++ programming concepts, and tasks involving class creation and operator overloading. The exam is structured to assess knowledge on various topics such as function declarations, memory allocation, and object-oriented programming features.

Uploaded by

senona6037
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Internal Paper

This document outlines the internal examination for Object Oriented Programming for the semester 2 at CVM University, scheduled for May 15, 2023. It includes instructions, a series of questions related to C++ programming concepts, and tasks involving class creation and operator overloading. The exam is structured to assess knowledge on various topics such as function declarations, memory allocation, and object-oriented programming features.

Uploaded by

senona6037
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Enrollment No.

____________________

ADIT/GCET/MBIT
(Constituent Colleges of CVM University)
202000212: Object Oriented Programming
Semester - 2 Internal Examination – May 2023

Date: 15/05/2023 Time: 10:00 am To 11:00 am Maximum Marks: 20


Instructions:
1. Figures on the right indicate full marks.
2. Make the suitable assumption if required, do specify the same.

Q. 1 (A) Answer the following. [04]


(i) Which of the following function declaration is correct?
a. int add(int x, int y =5, int z=10);
b. int add(int x=5, int y =10, int z);
c. int add(int x=5, int y, int z=10);
(ii) List any two operators which cannot be overloaded in C++.
(iii) Write dynamic memory allocation functions in C.
(iv) Which access specifier is used as default in a class definition?

Q. 2 (A) 1. List the concepts (features) of Object Oriented Programming language. [04]
2. Explain inline function with suitable example.

(B) Create a class coordinate with private integer members, x and y. Overload ‘+’(binary [04]
plus) operator to add two objects of class coordinate using friend function. Define
necessary functions to set and display the data members. Demonstrate the class with a
main() function.
OR
(B) Create a class animal with private data members age and weight. Declare a constructor [04]
to initialize the members. Create a member function show() to display the members.
Create an array of 3 objects and display.

Q. 3 (A) Write a short note on Constructors in C++. [04]

(B) 1. Explain call by value and call by reference in C++. [04]


2. Consider the class time with members hours and minutes. Write a conversion function
to convert integer to class (time).
OR
(B) What is function overloading? Mention rules for function overloading. Write a C++ [04]
program to compute the area of a triangle and a circle by overloading the area() function.

* * * * * * * * ALL THE BEST * * * * * * * *

You might also like