Write A C Program to define a structure for storing employee details, employee name, date of joining and salary

struct employee { char name [20]; int day; char month [10]; int year; flaot salary; }; main ( ) { ...


struct employee
{
char name [20];
int day;
char month [10];
int year;
flaot salary;
};

main ( )
{
struct employee emp;
printf ( “enter employee details”);
scanf(“%s%d%s%d%f”,&emp.name,&emp.day,&emp.month,&emp.year,&emp.salary);
printf (“employee name = %s \n date of joining = %d%s%d \n salary = % f, emp.name, emp.day, emp.month, emp.year, emp.salary);
getch ( );
}



Related

Program for Finding Factorial of a given number using Recursion

#include<stdio.h> #include<conio.h> fact ( int n); main( ) { int n, r; printf (“enter a value “); scanf (“/d”,&n); r=fact(n); printf (“factorial is % d “,r); } fact ( int...

Program for Transpose of a given Matrix.

#include<stdio.h> #include<conio.h> main ( ) { int a[10][10],b[10][10],m,n,i,j; printf (“enter number of rows and columns”); scanf (“%d%d”, & m, &n); printf (“enter elemen...

Write A Program for printing Mathematical Table

# include <stdio.h> #include<conio.h> main( ) { int i, n, k = l; printf (“enter n value”); scanf (“%d”, &n); for (i = 1; i< 20; i ++) { k = i * n ; printf (“\n % d* %d...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item