Manage Employee Data using Structures in C++
Here you will get example program of employee data using structures in C++ programming. This is the basic example program to implement the structures in C++.
C++ program of employee data using structures
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include<iostream> using namespace std; struct Employee_Data; { char Ename[30]; int Eid; float Esal; }; int main() { Employee_Data ed; cout << "\nInput Employee Data......\n\n"; cout << "Enter name: "; cin >> ed.Ename; cout << "Enter employee id: "; cin >> ed.Eid; cout << "Enter Salary: "; cin >> ed.Esal; cout << "\nPrint Employee Data......\n\n"; cout << "\nName : " << ed.Ename ; cout <<"\nEmp Id : " << ed.Eid ; cout << "\nSalary : " << ed.Esal; return 0; } |
Output
Input Employee Data……
Enter name : Ajay
Enter employee id : 1005
Enter Salary : 25000
Print Employee Data……
Name: Ajay
Emp Id : 1005
Marks: 25000
Check out our other C++ programming Examples