Which of the following are legal access to the class or struct members? Assume each is outside of the class member definitions,
```
struct S class C class D
{ { {
int x; int x; public:
int y; int y; int x;
} private: int y;
S s; int z; private:
}; int z;
C c; };
D d;
```
a) s.x
b) c.x
c) d.x
d) c.z
e) d.z
a) s.x is legal. struct members are public unless otherwise specified.
b) c.x is illegal. class members are private unless otherwise declared public, unless used in a member function definition. No member function for class C are present.
c) d.x is legal. x is declared to be public within class D
d) c.z is illegal. All members of a class are private unless declared public, unless used in a member function definition. No member function for class C are present.
e) d.z is illegal, unless this is in a definition of a member of class D. No member functions are present.
You might also like to view...
This type of connection is always used for dial-up.
A. PPPoE B. DHCP C. PPP D. PPTP
Which of the following is NOT a type of safeguard mandated by the Security Rule of the Health Insurance Portability and Accountability Act ("HIPAA")?
A. Technical B. Administrative C. Physical D. Procedural
The US-China Safe Harbor is a streamlined process for US companies to comply with the Chinese directive on the protection of personal data
a. true b. false
A two dimensional array is accessed much like you access cells in a spreadsheet.
Answer the following statement true (T) or false (F)