How is a structure different from a class?

Q9. How is a structure different from a class?

Ans. A class can represent data elements as well as their associated functions that manipulate them whereas a structure can only represent the data elements. It has no control over the associated functions of data.

Leave a Reply

Your email address will not be published. Required fields are marked *

75 Views
%d bloggers like this: