subject

The following code generates an error. Why? class School {
public:
void PrintNames();
protected:
void SetNames();
string names;
private:
string address;
};
class NewSchool : School {
public:
string GetNames();
};
int main() {
NewSchool myObject;
String str;
myObject. SetNames();
str = myObject. GetNames();
return 0;
}

a. In class NewSchool : School, the specifier is not mentioned.
b. The function myObject. SetNames() is not accessible by main().
c. The variable address is accessible by the class NewSchool.
d. The variable name is accessible by main().

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Ais a built in formula in spread spread a is any math process such as addition or subtraction. options are function and operation
Answers: 1
You know the right answer?
The following code generates an error. Why? class School {
public:
void PrintNames();...
Questions
question
English, 16.10.2021 21:30
question
Mathematics, 16.10.2021 21:30
question
Mathematics, 16.10.2021 21:30
question
Mathematics, 16.10.2021 21:30
question
Mathematics, 16.10.2021 21:30
question
Mathematics, 16.10.2021 21:30
Questions on the website: 13722367