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...
If you want all of the links in your document to point to a new window, you can add the target attribute to a(n) ____ element in the document's header.
A. title B. base C. a D. script
The Shear tool is a transform tool that allows you to distort artwork along a horizontal or vertical axis.
Answer the following statement true (T) or false (F)
The proper handling procedures for substances such as chemical solvents is typically outlined in which of the following options?
A. ?Toxic Chemical Safety Procedure (TCSP) B. ?Dangerous and Hazardous Waste Disposal Sheet (DHWDS) C. ?Environmental Chemical Hazard Sheet (ECHS) D. ?Material Safety Data Sheet (MSDS)
How can you increase the saturation for a small area of an image?
What will be an ideal response?