-
-
Classes
Why should you generally pass an object of the class to a friend function as a reference parameter?Choose one answer. a. if the friend function changes the values of the data member(s) b. if the friend function will not change the values of the data member(s) c. It is more efficient to pass the object by reference. d. A and B e. A and C
-
-
What is the difference between class and structure?
Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public. Class: Class is a successor of Structure. By default all the members inside the class are private.