Recognizing Class Hierarchy

Practice Questions

Computer Science › Recognizing Class Hierarchy

Questions
2
1

What is the value of the string kitchen after the following code is run?

  1. class home
  2. {
  3. public:
  4. home(string);
  5. void searchhome();
  6. int buyhome();
  7. private:
  8. string kitchen();
  9. };
  10. home::home(string c)
  11. {
  12. kitchen=c;
  13. }
  14. int main()
  15. {
  16. str=’big’;
  17. home(str);
  18. }
2

Consider the history of the following popular programming languages:

PHP

Java

Objective-C

Python

Which of the following is the closest ancestor shared by ALL of these languages?

Return to subject