CBSE eBooks CBSE Guess > eBooks > Class XII > Computer Science By . Mr. MRK
Chapter – 4. CLASSES AND OBJECTS Ans: class myfolder 2002: 2.a. What do you understand about a member function? How does a member function differ from an ordinary function? Ans: A member function is a function declared within a class. It is said to be defined in two ways. Ie Outside the class and inside the class. When a member function is defined outside the class, the name of the function must be the full name including the class name as well. When a member function is defined inside the class, the name of the function is similar to an ordinary function but it will become an inline function. 2.b. Define a class Student for the following specifications. Private members of the Student are:
|