What is wrong with this code?
```
class Jeans
{
private:
int size;
string brand;
public:
Jeans() {size = 10; brand = “Levis”;}
void SetSize(int s) {size = s;}
void SetBrand(string b){brand = b;}
};
int main()
{
Jeans jeans;
jeans.size = 8;
return 0;
}
```
A. Nothing is wrong with this code.
B. Can’t have two statements in Jeans( ).
C. Size is a private variable of Jeans, can’t be accessed by jeans.
D. Assignment in main should be Jeans.size = 8;
C. Size is a private variable of Jeans, can’t be accessed by jeans.
You might also like to view...
The ORDER BY clause in an SQL statement is used to ________
A) sort a field B) combine one or more queries C) define how fields are related D) select the highest values of the next field listed
An important part of building a good worksheet is using ________
A) styles B) conditional formatting C) calculations D) documentation
The image file formats used for Web pages differ in how they ____________________ image files.
Fill in the blank(s) with the appropriate word(s).
The ____ button on the Shape options bar creates a temporary work path.
a. Temporary work path b. Create path c. Paths d. Create new shape layer