A member of a structure or of a class is accessed using the
Solution
Dear Student,
Here are the answers...
Answer: 1: Option A is correct.
A member of a structure or of a class is accessed using the dot operator(.).
Ex:
struct student
{
int ID;
}Stu1;
here student is the structure and ID is the member, so ID of the student will be accessed in the main function as below.
Stu1.ID;
Answer: 2: False
A C++ structure may contain different data types while a C++ array contains similar data types.
Answer: 3 True
Nesed structures have a member whose type is another structure.
Answer: 4 True
(No outside Access is allowed.)
Yes there is no access to private members of a class by any function defined outside the class.
\"If you want to access the private member, you can declare a function/class as friend of that particular class, and then the member will be accessible inside that function or class object without access specifier check.\"
Answer:5 False
The dot operator is used between an object and a data memebr, not between a calling object and a call to member function.
Ex: emp.name ( here emp is an object and name is the data member )
To access the member functions scope resolution operator [::] is used.
Kindly Check and Verify Thanks...!!!