Witam, uczę się na exam i mam problem z trzema pytaniami po angielsku. Pomógłby mi ktoś odpowiedzieć?
1.From the list, select true sentences:
a)Constructor functions cannot return values.
b)A function name is the only identifier that can be followed by parentheses.
c)Constructor functions can receive values.
d)We can call a constructor function for an object only once in a program.
e)We pass a value to a constructor in a declaration.
2.From the list, select true sentences:
a)The private data members of base classes remain private to that class.
b)Inheriting from two or more base classes is called multiple inheritance.
c)Creating levels of inheritance is also called multiple inheritance.
d)Even a pure virtual function needs a definition.
e)Virtual objects can be created from virtual classes.
3.From the list, select true sentences:
a)Defining a class reserves memory for the class's data members.
b)Declaring an object reserves memory for the data members of the object's class.
c)An object of a class (with the class defined at the beginning of a program outside the body of any function) can be declared only in member functions.
d)Only private member functions can access private member data.
e)Only public member functions can access public member data
- Rejestracja:około 11 lat
- Ostatnio:ponad 6 lat
0
edytowany 1x, ostatnio: arturek999

spartanPAGE
Nienawidzę, gdy słowa 'metoda' i 'funkcja' są używane zamiennie.

_13th_Dragon
metoda to funkcja składowa, czyli jednak funkcja, aczkolwiek też mnie to czemuś drażni.

- Rejestracja:około 21 lat
- Ostatnio:prawie 3 lata
- Lokalizacja:Space: the final frontier
- Postów:26433
0
No i jakie są twoje odp?

- Rejestracja:ponad 21 lat
- Ostatnio:około 4 godziny
0
We can call a constructor function for an object only once in a program.
Short answer: yes.
Long answer: it depends what you mean.
Jestem bardzo ciekaw, jaka jest „prawidłowa” odpowiedź na tak nieprecyzyjnie zadane pytanie.
Zobacz pozostałe 2 komentarze

ale "an object" to to samo co "a single object"

a/an niesie podtekst “one”, więc dodanie “single” nie zmienia znaczenia zwrotu.

- Rejestracja:prawie 13 lat
- Ostatnio:ponad 8 lat
- Lokalizacja:Kraków
- Postów:467
0
Według mnie
- e)We pass a value to a constructor in a declaration. nie pasuje mi to, że chodzi o deklarację, według mnie to zdanie jest fałszywe.
- d)We can call a constructor function for an object only once in a program. jest prawdziwe, chciałbym zobaczyć przykłady, które rzekomo pokazują, że to jest fałsz
edytowany 1x, ostatnio: Sopelek
Zarejestruj się i dołącz do największej społeczności programistów w Polsce.
Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.