0% found this document useful (0 votes)
4 views

Program 3

C program SLIP ans

Uploaded by

12aabbaa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Program 3

C program SLIP ans

Uploaded by

12aabbaa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include <stdio.

h>

#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

typedef struct emp{

int id;

char name[50];

int salary;

};

int main(int argc, char *argv[]) {

struct emp e[50];

int i;

int n;

printf("Enter Numbers of Employees:");

scanf("%d",&n);

printf("Accept Emp Data:\n");

for(i=0;i<n;i++){

printf("Enter Employee Id%d",i+1);

scanf("%d",&e[i].id);

printf("Enter Employee Name%d",i+1);

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

printf("Enter Employee Salary%d",i+1);

scanf("%d",&e[i].salary);
}

printf("Details Of Employee\n\n");

void Display(struct emp e[50]){

int i;

for(i=0;i<n;i++){

if(e[i].salary>10000){

printf("Employee Id:%d\n",e[i].id);

printf("Employee Name:%s\n",e[i].name);

printf("Employee Salary:%d\n",e[i].salary);

Display(e);

return 0;

You might also like