Subject not found.
1.

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.

Answer»

(i) SmallObj

(ii) private int some, more;

(iii) private void err_1(){cout<<"error";}

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

 public void Ydata() {cout<<some<<" "<<more; }

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



Discussion

No Comment Found

Related InterviewSolutions