C++, C, C#, Java Questions 1) Which language does not support an encapsulation c
ID: 3567012 • Letter: C
Question
C++, C, C#, Java Questions
1)
Which language does not support an encapsulation construct for a single data type and
its operations?
a. C++
b. C#
c. Java
d. Ada95
2) For the C++ class MyClass , the class destructor prototype is:
a. end();
b. terminator();
c. ~MyClass();
d. dtor();
3) Which of the following access modifiers are defined in C# but not in C++?
a. private
b. protected
c. public
d. internal
4) Which of the following languages does not support nested subprograms?
a. Ada
b. Java
c. Python
d. Ruby
5) In Java, the import statement allows references to names in a package.
a. True
b. FalsePage 2
6) C and C++ use header files for interfaces to library files.
a. True
b. False
7) Which of the following is not a design issue for object-oriented languages?
a. Are methods required to return only objects?
b. Objects exclusivity
c. Single vs. multiple inheritance
d. Are subclasses subtypes (e.g., derived classes)?
8) C++ supports OOP and procedure-oriented programming.
a. True
b. False
9) Multiple inheritance means a subclass has more than one parent class.
a. True
b. False
10) A Java interface is an alternative to multiple inheritance.
a. True
b. Falseher programming questions
Explanation / Answer
1.d. Ada95
2.c. ~MyClass();
3.b. protected
4.a.Ada
5.a. True
6.a. True
7.c. Single vs. multiple inheritance
8.a. True
9.b. False
10.b. False
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.