Question: What is the difference between class attributes and instance attributes?

  1. Instance attributes can be changed, but class attributes cannot be changed
  2. Class attributes are shared by all instances of the class. Instance attributes may be unique to just that instance
  3. There is no difference between class attributes and instance attributes
  4. Class attributes belong just to the class, not to instance of that class. Instance attributes are shared among all instances of a class

Answer: The correct answer of the above question is Option B:Class attributes are shared by all instances of the class. Instance attributes may be unique to just that instance