You are on page 1of 2

JSPM’s Jayawant Institute of Management Studies

Department of MCA
Assignment 1

Sub: Advanced DS & C++ Class MCA-II Sem: III

Academic year: 2019-20 session: July 2019- Nov.2019 Batch: 2018-2021


Date: Submission Date:

Q.1 Differentiate C and C++ memory management schemes. ( new and malloc() )
Q.2 Write a program to demonstrate default arguments and constant arguments for a
function.
Q.3 Write a program to read a set of integers up to n, where n is defined by the user and
stored in one dimensional array. Also read a set of floating point numbers of the same
size and store it into another one dimensional array and display the contents of these
two arrays separately, using overloading technique.
Q.4 What is Constructor? Explain its uses. Write a program to demonstrate dynamic
constructor and parameterized constructor.
Q.5 What is friend function? Explain its features with an example.
Q.6 Write a program to design a class for addition of two objects using friend function
Q.7 Write a program to add two polynomials using overloaded ‘+’ operator.
Q.8 Write a program to overload << and >> operators for accepting and displaying object
details. For example: class Demo {-----};
void main()
{
Demo d;
cin>>d; //will accept members of object
cout<<d; //will display members of object
}
Q.9 What is inheritance? Explain its type with example. Also explain constructor invocation
with respect to inheritance.
Q.10 Explain virtual function/ dynamic binding/ late binding with example.
Q.11 Define class time24 and time12 which follows 24 hour and 12 hour time respectively.
Define functions to convert object of class time24 to time12 and vice versa.
Q.12 Write a program to copy alternate character from file “source.txt” to file
“destination.txt”.
Q.13 Explain file pointers with example.
Q.14 An ABC company has following details of their employee in the emp.dat file. Empid,
Empname, Empaddress, Empdept, empAge & empsalary. Write a program to read
above file. Create a new file such as admin.dat, sales.dat, IT.dat respectively to store the
employee details according to their department.
Q.15 What is an exception handler? What are the keywords used to handle the exception in
C++? Also explain how certain exception types are not allowed to be thrown.

Shweta Padale
Subject Teacher

You might also like