C program to print Structure.

 C program to print Structure.


#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct Employee
{
    char name[30];
    int id;
    float salary;
};

struct Employee e;


int main(){
    printf("Enter employee details(name, id , salary) : \n");
    scanf("%s %d %f", e.name, &e.id, &e.salary);
    printf("Employee Details :\n");
    printf("Name :%s\n Id : %d\n Salary :%.2f", e.name, e.id, e.salary);
        
    getch();

    return 0;
} 
 

OUTPUT: