Write a program of structure of accepting the employee information and displaying it using structure

//this is a program of structure of accepting the employee information and displaying it
#include<stdio.h>
#include<conio.h>
void main()
{
struct employee
{
char name[10];
long int salary;
char city[10];
}e;

printf("\n\nEnter the Name, Salary and City of the Employee: ");
scanf("%s%ld%s",e.name,&e.salary,e.city);

printf("\n\nName=%s\n\nSalary=%ld\n\nCity=%s",e.name,e.salary,e.city);

getch();
}

Previous
Next Post »