Computer Science, asked by parkitithapa9, 1 month ago

Write a program to input employees,Id,name, address and post of 20 employees and display them properly​

Answers

Answered by chuttijames
6

Answer:

/Input name and post of 5 employees and display records using structure.

#include<stdio.h>

#include<conio.h>

main()

{

int i;

struct employee

{

char name[20];

char post[15];

}

e[5];

for(i=0;i<5;i++)

{

printf("Enter Name:\n");

scanf("%s",e[i].name);

printf("\n Enter Post:\n");

scanf("%s",e[i].post);

}

printf("\nName and Post of employee are:");

for(i=0;i<5;i++)

{

printf("\nName=%s\tPost=%s",e[i].name,e[i].post);

}

}

Similar questions