Wednesday, 6 April 2016

What are structures?

Structure is a heterogeneous collection of elements referenced by the same name. A structure is declared using the struct keyword. The following is an example that creates a structure to store an employee's information:

struct emp
  {
       fixed int empID[15];
       fixed char name[30];
       fixed char addr[50];
       fixed char dept[15];
       fixed char desig[15];
  }

The preceding example defines a structure emp and the members of this structure specify the information of an employee.


No comments:

Post a Comment

Featured post

What is SharePoint?

Microsoft SharePoint is an extensible platform that provides a range of products that can help organizations with solution for a variety...