Knowee
Questions
Features
Study Tools

Which of the following comments about the usage structures is true? a) Storage class can be assigned to individual member b) Individual members can be initialized within a structure type declaration c) The scope of the member name is confined to the particular structure, within which it is defined d) None of the above

Question

Which of the following comments about the usage structures is true? a) Storage class can be assigned to individual member b) Individual members can be initialized within a structure type declaration c) The scope of the member name is confined to the particular structure, within which it is defined d) None of the above

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is c) The scope of the member name is confined to the particular structure, within which it is defined.

Here's why:

a) Storage class can be assigned to individual member - This is not true. In C, storage classes like auto, register, static, and extern are not allowed for structure members.

b) Individual members can be initialized within a structure type declaration - This is also not true. In C, you cannot initialize members within the structure definition. You can only declare them.

c) The scope of the member name is confined to the particular structure, within which it is defined - This is true. The scope of a member of a structure is limited to the structure itself. You can have the same member name in different structures.

d) None of the above - Since option c is correct, this option is not true.

This problem has been solved

Similar Questions

Which of the following cannot be a structure member?

Choose a correct statement about C structures.Question 29Select one:Structure elements can be initialized at the time of declaration.Only integer members of structure can be initialized at the time of declaration.Structure members can not be initialized at the time of declarationNone of the above

Which of the following structure declaration will throw an error?Question 32Select one:struct temp{}s; main(){}struct temp{}; struct temp s; main(){}struct temp s; struct temp{}; main(){}None of the mentioned

Choose a correct statement about C structures.Question 9Answera.A structure size is limited by only physical memory of that PC.b.A structure can contain same structure type member.c.All the above.d.You can define an unlimited number of members inside a structure.

Which of the following statements is NOT true about constructors?They can be overloaded.They have the same name as the class.They can be used to allocate memory for the object.They can initialize member variables.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.