Help shape GoConqr. What should we add next?

Quiz

CS1B Ch 7 Quiz

Erik Malpass 35 questions

Take the quiz

Questions in this quiz (35)

  1. 1In C++, new types are mostly created using _________.
    1. AA. A function
    2. BB. A class or struct
    3. CC. Either A or B
    4. DD. None of the above
  2. 2In object-oriented programming, a data member plays the role of _________.
    1. AA. An attribute
    2. BB. A behavior
    3. CC. Either A or B.
    4. DD. None of the above
  3. 3In object-oriented programming, a member function plays the role of a
    1. AA. An attribute
    2. BB. A behaviour
    3. CC. All of the above
    4. DD. None of the above.
  4. 4In C++, attributes and behaviors are declared in the
    1. AA. Class Declaration
    2. BB. Class Definition
    3. CC. Either A or B
    4. DD. None of the above
  5. 5In C++, attributes and behaviors are normally defined in the
    1. AA. Class Definition
    2. BB. Member Function Definition
    3. CC. All of the above
    4. DD. None of the above
  6. 6In a class, all members are by default:
    1. AA. Private
    2. BB. Protected
    3. CC. Public
  7. 7In C++, we need a _____ at the end of class definition
    1. AA. Colon
    2. BB. Dot
    3. CC. Semi-colon
    4. DD. None of the above
  8. 8In a class, a private data member can be accessed
    1. AA. In the class
    2. BB. Through the public member functions
    3. CC. Either A or B
    4. DD. None of the above
  9. 9In a class, a public member function can be accessed
    1. AA. In the class
    2. BB. Through the other public member functions
    3. CC. Outside the class
    4. DD. All of the above
  10. 10To define a member function outside of a class, we need the ______ operator.
    1. AA. Member Select (.)
    2. BB. Class Scope (::)
    3. CC. Either A or B
    4. DD. None of the above

Information

Description
Computer Science Quiz on CS1B Ch 7 Quiz, created by Erik Malpass on 02/05/2023.
Language
English
Views
16
Tags
computer science
Rating
No ratings yet
Rate this quiz
Rate this quiz

More on Classes and Objects

Feedback

What is it about?

What should we add next?