What Is Structure?
The structure is a user-defined data type in C which allows you to combine different data types to store a particular type of record. The structure is used to represent a record. Suppose you want to store a record of Student which consists of student name, address, roll number and age.
Defining a structure
struct keyword is used to define a structure. struct define a new data type which is a collection of different type of data.
Syntax :
struct structure_name
{
//Statements
//Statements
//Statements
//Statements
};
Output
Enter Employee Id : 101
Enter Employee Name : mohamad
Enter Employee Salary : 30000
Enter Employee House No : 89
Enter Employee City : dubi
Enter Employee House No : 69
Details of Employees
Employee Id : 101
Employee Name : mohamad
Employee Salary : 30000
Employee House No : 89
Employee City : dubi
Employee House No : 69
need an explanation for this answer? contact us directly to get an explanation for this answer