GoogelAddUnit1

Thursday, 10 March 2011

C Program on employee details using structures.

/*  employee details using stuctures  */           
#include<stdio.h>
#include<conio.h>
struct emp
{
 int empno;
 char ename[10];
 int esal;
} ;
main()
{
    struct emp e[10];
    int n,i;
    clrscr();
    printf("\n how many records");
    scanf("%d",&n);
    printf("\n enter the records");
    for(i=0;i<n;i++)
    scanf("%d%s%d",&e[i].empno,e[i].ename,&e[i].esal);
     printf("\n entered records are");
    for(i=0;i<n;i++)
    printf("\n %d\n %s\n %d",e[i].empno,e[i].ename,e[i].esal);
    getch();
}

1 comment:

  1. Time sheet is useful for Tracking Employee work hours and project hours is very essential for any business .This time sheet is very simple and easy to use , Timesheet nice article ..great work...!!!!!!!

    ReplyDelete