The member functions input and display of class emp can be referred in the either of the two ways as shown. This implies that *ptr is an alias forthe object1
We can use the new operator to allocate memory to objects dynamically. An array of objects can be created using pointers as shown. Here, an array of five objects of type class emp has been created.

