In: Computer Science
a. (T or F) A member of a class can be a method or an attribute.
b. (T or F)The private attributes of a class cannot be accessed by the public methods of that class.
c. (T or F) The initialization of a variable in the declaration
Ex: int counter = 0;
is not allowed inside a class definition.
d. (T or F) In C++ a class is a definition; it does not exist in RAM until an object is created, using the definition.
e. (T or F) A member of a class that was created “on the stack” (locally) can be accessed by using the dot operator (.) followed by the member name.
ANS.a> correct option is:- true.
Explanation:- because within a class we can some features of class that are the attributes/object or some type of method/function.
Ans.b> correct option is :- true
Explanation:- because the private attribute of a class can only be accessed by the function or method inside the same class,i.e., only friend fiction or member function are allowed to access the private data attribute of a class.
Ans.c> correct option is :- false
Explanation:- because we can initialized the variable decleartion inside class detonation.
Ans.d> correct option is:- true
Explanation:- because if object is variable type then as the work is done everything will be gone,but it variable is defined then its permanent and can be used in every time you run the programming and value will be same.
Ans.e> correct option is:- true
Explanation:- because it used for direct member selection via object name.
Object.member