Q:

Consider the following class declaration and answer the questions below:

class SmallObj

{

private:

int some,more;

void err_1() {cout<<“error”;}

 public:

void Xdata(int d) {some=d;more=d++; }

void Ydata() {cout<<some<<” “<<more; }

};

(i) Write the name that specifies the above class.

(ii) Write the data of the class with their access scope. 

(iii) Write all member functions of the class along with their access scope.

(iv) Indicate the member function of the SmallObj that sets data.

CLASSES

All Replies

Viewing 1 replies (of 1 total)

Viewing 1 replies (of 1 total)

  • You must be logged in to reply to this topic.