Complete the code to declare a default constructor for class Car.
class Car { public: [1]() {} };
The default constructor has the same name as the class and no return type.
Complete the code to create an object car1 using the default constructor.
Car [1];To create an object with the default constructor, just declare the object name.
Fix the error in the default constructor declaration.
class Bike { public: [1]() {} };
Constructors should not have a return type like void.
Fill both blanks to define a default constructor that sets wheels to 4.
class Vehicle { public: int wheels; [1]() { wheels [2] 4; } };
The constructor name matches the class name, and the assignment operator '=' sets wheels to 4.
Fill all three blanks to create a default constructor that initializes brand and sets speed to 0.
class Bike { public: std::string [1]; int [2]; [3]() { brand = "Yamaha"; speed = 0; } };
Member variables brand and speed are declared, and the constructor named Bike initializes them.