1.lab 1 - Classes
1.lab 1 - Classes
Experiment 1:
“Implement Classes & Objects using C++”
Lab Task: Write a C++ program by using a class to input the name of
the student and marks of three subjects. Calculate the total marks and
average marks. Each subject has maximum marks of 100.
Defining Member functions Outside
the Class
Member functions of a class can be defined outside the class.
In such case only prototype of the member function is declared inside the
class.
Scope resolution operator is used in the member function declaratory to
define the function of class outside the class