SUMMER TRAINING Free Tutorials  Go To Your University  Placement Preparation 
Project Based Best Summer Training Courses in Jaipur
Join our Telegram Channel To take free Online Courses
0 like 0 dislike
in GTU B.E. (CSE-I-Sem) Programming For Problem Solving Lab by Goeduhub's Expert (7.1k points)

Define a structure type struct personal that would contain person name, date of joining and salary using this structure to read this information of 5 people and print the same on screen.

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.1k points)
edited by
Best answer

In this program we are going to implement a structure Personal which contains name, date of joining and salary of employees.

To learn about structure and union from beginning Click Here.

Example :


//Declaration of structure Personal
struct Personal{

//Structure data members declaration
int salary,date;
char name[100];
//Using an array to hold information of 5 employees

void main()
int i;

//Values are being inserted by user
printf("\nEnter the following information of employees:");
printf("\nEmployee %d\nName:",i+1);
printf("\nJoining date(date and month as 2203):");

//Printing Employee information on output window
printf("\nEntered information is as follows:");
printf("\n|| S.No. ||      Name      ||    Salary    ||   Joining Date   |");
printf("\n|| %d     ||     %s          %d            %d     ",i+1,per[i].name,per[i].salary,per[i].date);

Output :

Output of above program showing structure operations

For More GTU C Programming Lab Experiments Click Here

Our Mentors(For AI-ML)

Sharda Godara Chaudhary

Mrs. Sharda Godara Chaudhary

An alumna of MNIT-Jaipur and ACCENTURE, Pune


Ms. Nisha

An alumna of IIT-BHU

Related questions


About Us | Contact Us || Terms & Conditions | Privacy Policy || Youtube Channel || Telegram Channel © Social::   |  |