Why do we use structure? Write a C program using structure to input name, age and salary of few employees and display it.
Structures in C are used to group together related data of different data types into a single user-defined data type. They provide a way to organize and represent complex data structures in a more manageable way.
OUPUT:
Enter the number of records u wanted to get 3
Enter the name, age and salary
Aadarsh 17 92382
Enter the name, age and salary
Bhagat 17 2872302
Enter the name, age and salary
Vision 17 8293202
Name is Aadarsh
Age is 17
Salary is 92382
Name is Bhagat
Age is 17
Salary is 2872302
Name is Vision
...