हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा ११

Answer the question after going through the following class. Write the statements in main to invoke function1 and function2?

Advertisements
Advertisements

प्रश्न

Answer the question after going through the following class.

class Book {
int BookCode ; char Bookname[20];float fees;
public:
Book( )   //Function 1
{ fees=1000;
BookCode=1;
strcpy(Bookname,"C++"); }
void display(float C) //Function 2
{ cout<<BookCode<<":"<<Bookname<<":"<<fees<<endl; }
~Book( )         //Function 3
{ cout<<"End of Book Object"<<endl; }
Book (intSC,char S[ ],float F) ; //Function 4
};

Write the statements in main to invoke function1 and function2?

एक पंक्ति में उत्तर
Advertisements

उत्तर

book b;
b.display (4.5);

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 15: Polymorphism - Evaluation - Section - D [पृष्ठ २५८]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
अध्याय 15 Polymorphism
Evaluation - Section - D | Q 2. (iv) | पृष्ठ २५८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×