C++ By Aadil Keshwani aadil.keshwani@gmail.com Assignment: 3 Title: Dynamic Memory Management Submission date: 20-12-2007 Questions: 1. Explain memory management operators of c++. 2. Explain the advantages of new operator over malloc(). Programs: 1. Write a c++ program to create two dimensional matrix dynamically, where number of rows and number columns should be user given. 2. Write a c++ program to create a class which creates an integer array at run time, sorts given integer and displays the array value with their average. 3. Write a c++ program to create a class string, which stores string with constructor, displays the string and joins two string with join user defined function taking two arguments of string object. Assignment: 4 Title: Constructors and Destructors Submission date: 20-12-2007 Questions: 1. Explain constructor function and its special features. 2. Enlist type of constructors. Explain copy constructor with example. 3. What is destructor? What is the use of it? 4. What is the order of invocation of constructor and destructor? Why? Programs: 1. Write a c++ program to create a class complex having two integers real and imag. Create a three constructor function taking no argument, one argument and two arguments for three constructors. Show () and sum() functions are friend functions, displaying and finding the addition of two objects respectively. 2. Create a class two demonstrate constructor and destructor. Assignment: 5 Title: Inheritance Submission date: 20-12-2007 Questions: 1. What does inheritance mean in c++? 2. What are the different forms of inheritances? Give the example of each. -1– By www.sharebca.com Share BCA.Com A place to learn and share all about BCA C++ By Aadil Keshwani aadil.keshwani@gmail.com 3. Explain private, protected and public access specifiers with their inheritance base class visibilities and derived class visibilities with table. Assignment: 6 Title: Virtual Functions and dynamic Polymorphism Submission date: 20-12-2007 Questions: 1. What is the difference between runtime and compile time polymorphism? 2. What is the use of this pointer? 3. What is virtual function? Why do we need it? 4. Explain pure virtual function. 5. Explain abstract class and its properties. 6. Explain virtual base class. 7. Explain virtual destructors. Program: -2– By www.sharebca.com Share BCA.Com A place to learn and share all about BCA