ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
The following is an example of Struct PersonnelRecord { char name[100]; int socialSecurityNumber; char department[10]; float salary; };
Correct Answer: B — Class
The above declaration denotes a class, not an object, because it does not represent a specific instance. To declare objects of this class we usually write in the following way:
PersonnelRecord deb, dave, jim, tom;
Class declaration is almost similar to struct declaration except that in reality it uses a keyword 'class' in place of 'struct.'