1. Compare and contrast, structure and class. How will you make an array of structures, and an array of objects?
If a class nums is having 3 variables a,b and c, give the implementation of the class with functions for the following purposes, assuming all the variables to be private.
a)To initialize the members of the class unconditionally, ie without any parameter.
b)To initialize the members separately using suitable parameters.
c)To find out the average of 3 variables of the same type.
d)To print out all the values of all the variables.
e)To find out the biggest of the variable and to return it to the calling function.
f)To find out and to return the smallest of the variables, to the calling function.
g)To print the 3 variables in the sorted order
Answers
Answered by
0
Answer:
unconditionally" (and any subsequent words) was ignored because we limit queries to 32 words.
Similar questions