Documentation
Output
Student Details:
Roll Number: 100
Roll Number: 101
Roll Number: 102
-
Student *ptr[3]→ array of pointers -
new Student→ dynamic object creation -
ptr[i]->function()→ calling member function using pointer -
delete→ frees dynamically allocated memory