Multiple choice

Which of the following statements is FALSE regarding structures?

  1. Structures are user defined data types.

  2. Structures cannot be nested.

  3. Structures can contain different types of variables.

  4. Structures are used to represent a record.

  5. The dot operator is used to access the structure members.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Structures can be nested. A structure can contain a reference of another structure. For example : struct person {   char name[10]:   int age; }; struct emp { int empno; personal person; }; In the above code the 'person' variable has a reference of the 'person' structure as its datatype. If an object of the structure 'emp' is declared, we can not only access the member of 'emp' but also of the 'person' structure.