Function is returning reference of point class object.