a What is the difference between function and structures in
a) What is the difference between function and structures in C++?
b) What is the difference between structures and class in C++?
Solution
Ans a) The differences are as follows:
i) Functions are the derived data type while structures are the user defined data type.
ii) Functions can return or can not return a value, while structures can not return a value.
Ans b) : The difference between structures and class in C++ is that, in Class, members are private by default while in structures, members are public by default.
