Question: Consider a class Student. The following code is used to create objects and access its member functions. Which statement is true about the code? int
Consider a class Student. The following code is used to create objects and access its member functions. Which statement is true about the code?
int main
student newstud;
Student stud;
student oldstud;
stud.GetDetails;
return ;
There are three objects created of Student class and they each have their own memory allocations. The GetDetails function is invoked for all objects of the class Student.
There are three objects created of Student class and they each have their own memory locations. The GetDetails function is invoked for only the stud object of the class Student.
There are three objects created of Student class and the compiler allocates only one memory location. The GetDetails function is invoked for only the stud object of the class Student.
There are three objects created of Student class and the compiler allocates only one memory location. The GetDetails function is invoked for all objects of the class Student.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
