I am trying to learn C++. I answered a bunch of true/false questons I got from a class worksheet. Can some please tell me which is true or false to check myself? I put my answers towards the right.
1. when determining the length of a string, the blank spaces are ignored. false
2. All components of an array are of the same type. true
3.In C++ , an array index starts with 1. false
4. in C++, array is a reserved word. false
5. The size of the array must be known at the compile time. true
6. The data members of a class must be of the same type. true
7. The member functions of a class must be public. false
8. A public member function of a class can access only other public members of a class. true
9. In a class, all function members are public and all data members are private. false
10. The constructor with no parameters is called the default constructor. true
5. False. It's true for stack and global arrays, but not for dynamic arrays.
6. False.
8. False. A member function has access to all members of the class, regardless of their visibility.
Question 8 is worded ambiguously. It is true that any member function of a class can access any other member function of the same class (regardless of public/protected/private) but only has access to public member functions of a different class.