Dynamic allocation and de-allocation of the memory


Q1. Describe the major features of the object oriented programming.

Q2. Name the implicit member functions of the class. Illustrate the four cases.

Q3. Draw an inheritance hierarchy for the students at a university. Use student as the base class of the hierarchy, and then comprise classes UndergraduateStudent and GraduateStudent which derive from Student. Freshman, sophomore, junior, senior derive from UndergraduateStudent, and DoctoralStudent and MastersStudent derive from the GraduateStudent.

Q4. When do you call copy constructors? Illustrate the three cases.

Q5. Illustrate the type of ‘this’ pointer? When does it get made? Describe the importance of ‘this’ pointer with respect to the static member function and non-static member function.

Q6. Illustrate the four differences between the pointer and reference variables.

Q7. Write down the general syntax for dynamic allocation and de-allocation of the memory for arrays. Consider the given C++ statement which appears outside of a function.

int *A = new int[10];

Where and how much memory will be assigned when the statement executes?

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Dynamic allocation and de-allocation of the memory
Reference No:- TGS010576

Expected delivery within 24 Hours