Back To C++ Structures
//program to create a structure employee with members (ecode,ename,salary and designation) and input values from user and then display the values #include
#include
struct employee { int ecode; char ename[20]; float salary; char designation[20]; }; void main() { employee emp; clrscr(); cout<<"enter ecode of employee "; cin>>emp.ecode; cout<<"enter name of employee "; cin>>emp.ename; cout<<"enter salary of employee"; cin>>emp.salary; cout<<"enter designation of employee"; cin>>emp.designation; cout<<"\ndisplaying the values \n"; cout<<"\necode of employee is "<