Question:Consider the sample code given below and answer the question that follows.
1 class Car
2 {
3 private:
4 int Wheels;
5
6 public:
7 Car(int wheels = 0)
8 : Wheels(wheels)
9 {
10 }
11
12 int GetWheels()
13 {
14 return Wheels;
15 }
16 };
17 main()
18 {
19 Car c(4);
20 cout << "No of wheels:" << c.GetWheels();
21 }
Which of the following lines from the sample code above are examples of data member definition? 

A 4 

B 7 

C 8 

D 14 

E 19 

+ Answer
+ Report
Total Preview: 9651

Copyright © 2024. Powered by Intellect Software Ltd