Structures and unions

We studied earlier that array is a data structure whose element are all of the same data type. Now we are going towards structure, which is a data structure whose individual elements can differ in type. Thus a single structure might contain integer elements, floating point elements and character elements. Pointers, arrays and other structures can also be included as elements within a structure. The individual structure elements are referred to as members. This lesson is concerned with the use of structure within a 'c' program. We will see how structures are defined, and how their individual members are accessed and processed within a program. The relationship between structures and pointers, arrays and functions will also be examined. Closely associated with is the union, which also contains multiple members.

new21

Structures and unions - OBJECTIVES

After going through this lesson you will be able to

  • explain the basic concepts of structure
  • process a structure
  • use typedef statement
  • explain the between structures and pointers
  • relate structure to a function
  • explain the concept of unions

Structures and unions - Index

  • STRUCTURE
  • PROCESSING A STRUCTURE
  • USER-DEFINED DATA TYPES
  • STRUCTURES AND POINTERS
  • PASSING STRUCTURES TO A FUNCTION
  • UNIONS
  • IMPORTANT QUESTIONS

Download complete study material of STRUCTURES AND UNIONS

Leave a Reply

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