Test: Computer Science

Consider the following C++ pseudocode:

 

Class Car {

const int wheels = 4;

float milesPerGallon;

string make;

string model;

}

 

Car sportscar = new Car;

1.

What is the difference between the class car, and the object sportscar?

They have no relation.

They are both instantiated from something else.

They are the same.

Car is instantiated from sportscar.

sportscar is instantiated from Car.

1/2 questions

0%
Learning Tools by Varsity Tutors