2 Which of the following is an invalid way to initialize id

2. Which of the following is an invalid way to initialize id in the Account class a) Account (string id) id(id) b) const string Account: id 902 c const string id \"902\"; d) Account (string id) Account(id,\'S\') 3, Fields and methode

Solution

2.

b) const string Account::id = \"902\"; id is a non-static data member and it cannot be defined outside class.

a), b) and c) are the correct ways to initialize id.

 2. Which of the following is an invalid way to initialize id in the Account class a) Account (string id) id(id) b) const string Account: id 902 c const string

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site