Hi ! Studying late night...
02:58 am

Sponsor Area

Sponsor Area

Question is

Observe the following C++ code and answer the question.

class Traveller
{
	long PNR;
	char TName[20];
public :
	Traveller() //Function 1
	{
		cout<<'Ready'<<end1;
	}
	void Book(long P,char N[])//Function 2
	{
		PNR = P; strcpy(TName, N);
	}
	void Print() //Function 3
	{
		cout<<PNR << TName <<end1;
	}
	~Traveller() //Function 4
	{
		cout<<'Booking cancelled!'<<end1;
	}
};

Which function will be executed at }//Stops here? What is this function referred as?

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation