True or False If false state why or provide a counterexample
True or False? If false, state why (or provide a counterexample)
(a)
A C++ structure, or struct, like the C++ array, is a homogeneous data structure. (i.e., all data is of the same type)
(b)
A class is a type similar to a structure type that normally has member functions as well as member variables.
(c)
You can change the behavior of + for the int type using operator overloading.
(d)
If class D is derived from class B, we speak of D as the child class and B as the parent class.
(e)
A class may not have another class type object as a member.
(f)
A static variable of a class cannot be changed.
(g)
A constructor is a special kind of member function. It is automatically called when an object of that class is declared.
(h) _____
A friend function has access only to the private members and member functions of the class (and all objects of that class) of which it is a friend.
| (a) | A C++ structure, or struct, like the C++ array, is a homogeneous data structure. (i.e., all data is of the same type) | 
| (b) | A class is a type similar to a structure type that normally has member functions as well as member variables. | 
| (c) | You can change the behavior of + for the int type using operator overloading. | 
| (d) | If class D is derived from class B, we speak of D as the child class and B as the parent class. | 
| (e) | A class may not have another class type object as a member. | 
| (f) | A static variable of a class cannot be changed. | 
| (g) | A constructor is a special kind of member function. It is automatically called when an object of that class is declared. | 
| (h) _____ | A friend function has access only to the private members and member functions of the class (and all objects of that class) of which it is a friend. | 
Solution
a) a struct contains variables of different data types as compared to arrays which contains variables of same data type so : FALSE
B) True: A class is a data structure but class and structures are not the same. There is difference between class and structs.
c) false: If both data types are same then not, but if one of them is a user defined type then it is possible
d) true : class B is parent class and class D is child class then class D is said to be derived from class B
e)false: Association(creation of objects of another class) is possible in C++

