🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

OOPSE questions 1-10
10 Questions
14 Views

OOPSE questions 1-10

Created by
@SnazzyOnyx7314

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Abstract class in C++:

  • may represent a parameter type of a function or method
  • is useful for declaring interfaces to other classes (correct)
  • may represent the result type of a function
  • may represent a type of pointer and object reference (correct)
  • output:

  • 1:(),2:(***)
  • t1:(*), t2:(***)
  • 1:(***),2:(*)
  • 1:(*),2:(***) (correct)
  • The order of creating members of a compound object in C++ is as follows:

  • constructor body, object fields, virtually inherited class objects, non-virtual base classes
  • object fields, constructor body, virtually inherited class objects, non-virtual base classes
  • object fields, constructor body, non-virtual base classes, virtually inherited class objects
  • virtually inherited class objects, non-virtual base classes, object fields, constructor body (correct)
  • Class destructor in C++ has the property:

    <p>It is called automatically when the object of the corresponding type is removed from memory</p> Signup and view all the answers

    The 'this' keyword in C++ has the following properties:

    <p>is only available in the body of class methods, and is automatically initialized</p> Signup and view all the answers

    execution of the program will display :

    <p>11</p> Signup and view all the answers

    Select one:

    <p>a 2-parameter class template which declares an indexing operator</p> Signup and view all the answers

    Constructors in C++ do NOT have properties:

    <p>overloaded constructors will have different names</p> Signup and view all the answers

    Encapsulation in C++ has the following properties:

    <p>The private members of a class are only accessible from the objects of the same class</p> Signup and view all the answers

    The following declaration in C++:

    class complex; class Test { void fun() throw ( int, complex ); };

    declares:

    <p>a private method that can generate exceptions of types: int, complex and derived from complex</p> Signup and view all the answers

    More Quizzes Like This

    Use Quizgecko on...
    Browser
    Browser