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

A member function can call another member function directly, without using the dot operator called as ______

Advertisements
Advertisements

प्रश्न

A member function can call another member function directly, without using the dot operator called as ______

विकल्प

  • sub-function

  • sub-member

  • nesting of member function

  • sibling of member function

MCQ
Advertisements

उत्तर

A member function can call another member function directly, without using the dot operator called as nesting of the member function.

shaalaa.com
Introduction to Classes
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 14: Classes and objects - Evaluation - Section – A [पृष्ठ २४६]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
अध्याय 14 Classes and objects
Evaluation - Section – A | Q 3. | पृष्ठ २४६

संबंधित प्रश्न

What are called members?


Differentiate structure and class though both are user-defined data types.


What is the difference between the class and object in terms of oop?


Why it is considered good practice to define a constructor though a compiler can automatically generate a constructor?


The variables declared inside the class are known as ______.


Which of the following statements about member functions are True or False?

i) A member function can call another member function directly by using the dot operator.

ii) Member function can access the private data of the class.


The member function defined within the class behaves like ______ functions.


Which of the following access specifier protects data from inadvertent modifications?


Rewrite the following program after removing the syntax errors if any and underline the errors:

#include<iostream>
$include<stdio>
class mystud
{ int studid =1001;
char name[20];
public
mystud( ) { }
void register ( )
{cin>>stdid; gets(name); }
void display ( )
{cout<<studid<<”: “<<name<<endl;}
}
int main( ) { mystud MS; register.MS( ); MS.display( ); }
int main( )
{ mystud MS;
register.MS( );
MS.display( );
}


Write the output of the following

#include<iostream>
using namespace std;
class student
{
  int rno, marks;
  public: student(int r, int m)
  {
    cout << "Constructor " << endl;
    rno = r;
    marks = m;
  }
  void printdet()
  {
    marks = marks + 30;
    cout << "Name: Bharathi" << endl;
    cout << "Roll no : "<<rno << "\n";
    cout << "Marks : "<<marks << endl;
  }
};
int main()
{
  student s(14,70);
  s.printdet();
  cout << "Back to Main";
  return 0;
}

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×