















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















class Student{
…
public:
Student(){ rollNo = 0; … }
};
class Student
{
int rollNo; char *name; float GPA;
public:
… //no constructors
};
class Student{ … public: Student(); Student(char * aName); Student(char * aName, int aRollNo); Student(int aRollNo, int aRollNo, float aGPA); };
int main()
{
Student student1; Student student2(“Name”); Student student3(”Name”, 1); Student student4(”Name”,1,4.0);
}
void func1(Student student){
…
}
int main(){
Student studentA; Student studentB = studentA; func1(studentA);
}
Student studentA; Student studentB = studentA;
Name
GPA
RollNo
studentA
Name
GPA
RollNo
studentB A H M A D …
Memory