LearnFrenzy
Sign in Take a free test

OOPS Concepts · OOPS Concepts MCQ · Question 2

Class vs object in C++ Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 2 Back to Exercise

Which statement best describes the relationship between a class and an object?

  • A They are the same thing
  • B A class is a blueprint (a type); an object is an instance of it with its own data Correct
  • C An object is a blueprint for classes
  • D A class is a variable, an object is a function
Correct Answer: Option B

Car is the class; Car a, b; creates two objects, each with its own data members.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links