Question
. Read all employee details from use
Answer :
Word Count : 1211
____ __________ _______ _______ _______ ______ ____.
_________ _______ _____ __________ _______ ___ ____ _______ __________.
______ ____ ___ _________ _______ ___ ______.
______ ________ ________ ___ ______ ____ ______ ______.
__________ _____ __________ ________ ______ ______.
______ ____ ___ ________ _________ _________ ______ ____.
__________ ______ _________ _______ ________ _________.
_________ ____ ____ ___ ___ _______ _______ __________ _________.
_____ __________ ____ ___ ___ _____ _________ ____.
__________ _______ __________ ____ _____.
___ __________ __________ _____ __________ ___ __________ ____.
_____ _______ ______ _______ ______ ___ ____ ________ _______ _______.
__________ _____ _______ _____ _____ ______ _______ _______ ____ ________.
___ _________ _______ __________ ___.
_________ __________ _______ __________ ___ ________ _____ __________ __________ _________ ________.
__________ ___ ____ __________ ______.
____ ___ _____ _____ _____ ____ ____ ________ ______ _____ ___.
_______ _________ __________ ______ ______ ___ ______ ________ __________ ________ ______ ________.
__________ ___ ____ ______ _________.
_______ ________ ____ ____ ______ ________ _________.
___ ______ ____ ______ _______ _____ ______ ___ __________.
___ __________ _____ ________ _______ ____ __________ _________ _______ _______ _______.
_____ _________ __________ _____ ______ ____ ________ _______ ________.
_____ ______ _______ _________ ________ ___ ____ _________ ______ _______ __________.
______ ____ ___ ___ ______ ____.
_____ ________ ___ __________ _____ ________ _______ ___.
___ _______ _________ ____ ___ _________ ___ ______ ______.
____ __________ ____ _______ _____ _____ ______ ____ _____ _________ _____.
______ ____ ____ ________ _______ ______ ____ ___ ____ ______ ________.
_________ _______ __________ _____ ____ _________.
______ _______ _______ _______ _______ _______ ___ _____.
_______ ________ ________ __________ _________ ______ ___.
_______ _________ _____ ______ _______ _______.
________ _________ __________ ________ __________ _______ ___ __________.
_______ ____ _____ ________ ______ ________ __________ ____ _______ ____ __________ _________.
_________ _________ _________ ______ _____ ______ _______ ____ _______ ___ ___ __________.
__________ _______ ______ ____ _____ __________ ____ ____ __________ ______ ________ ______.
__________ ___ ___ _______ ______ _________ _________ ______ ______ ________ ___ ____.
___ ____ _______ __________ ______ ______.
____ _______ ________ ___ ___ _______ _______ ___.
___ ________ __________ __________ ________ _______ ____ _______ ___.
_____ ________ ______ ___ _________ ______.
__________ _____ _______ _____ _____ _____.
__________ ________ ______ ________ ______.
________ ______ __________ __________ __________ ______ ___ __________ ____ _____.
___ _______ ____ _______ _________ ________ __________ __________ ______.
________ ______ ___ __________ __________ ____ _____ _______ ___ ___ ______.
_____ ______ ______ _______ __________ _______.
___ ________ __________ _____ ___ ______ ___ ___.
_________ ___ _________ _____ __________ _______ _________ ___ _________ _________ ______.
____ ______ _________ __________ ________ ________ ____ _____ _____.
_______ ____ _________ ____ _______ _________ ________ ____.
_________ _____ _______ _____ __________ _________ _______.
_____ _________ _________ ___ ______ __________ ______ __________ _______ _________.
___ _____ ____ _________ ______ ______ _____ ___.
__________ ________ ______ __________ ____ _______ _____ _____ ______ _______.
______ _______ _____ __________ ____ ___.
____ _______ ____ ______ ____ _______ ___ _____ ________ ____ ____ ________.
________ _____ _________ ______ ______ _______ _________ _______.
___ _______ _____ __________ _______ ____ ________ _____.
_______ ________ ____ __________ ____ _____ _______ _____ _______ _____ ______.
_____ __________ ________ ________ ________ ____ ______ _____ __________ ______.
___ _________ _________ _______ ______ ___ ___ _________ _______ ___ _______.
______ __________ _____ ___ ___ _____ ___ __________ _________ ______ _____ ___.
___ ____ ________ _______ ____ _________ ____ ________ ___.
________ __________ ____ ________ ____ ____ ______.
_____ _____ _________ _________ __________ _____ _________.
___ ______ _______ ___ _____ _______ ___ ____ _______ __________ __________ ____.
________ _______ ___ ______ __________ _______ ______ ____ ______ _______ _________.
_______ ________ ______ __________ ____ ______ __________.
_________ ______ ___ _______ _______ ______ __________ _____ ______ ________ ________.
_________ ___ _________ __________ _____ _________ ____ ________ _________ _______ _________ ___.
___ __________ __________ ___ _________ __________ ______ _______ _________ _____ __________.
_________ _______ ____ ________ __________ __________ ________ ___ ____.
____ __________ _________ ___ ____ _____ ____.
______ _______ ____ _____ ________ ________ _________.
________ _______ __________ ________ ________ ____ _____ _______ ______ ______ _______.
____ ________ __________ ________ _____ ___ _______ ___ _______ ______.
________ ________ _________ _______ ___.
____ _____ ____ ______ _______ _________ _______ _________.
___ __________ ______ ___ ____ ______ ____ ___.
____ ___ ___ ________ ____ ______ ___ ____ _______ ________ ___.
_____ ________ ___ _______ ___ _____ ____ ___ ___ ______ ______.
____ ____ ___ ____ ___ _________ _______ __________ _______ __________ ________ _______.
________ ___ _______ ____ ____ _______ ______.
______ ______ _______ __________ _______ _______ ____ _______ _______ __________ ____.
_______ _________ ______ _____ ________ ____ ______ ___ ______ _______ ____ __________.
__________ _______ _______ ______ _______ __________ ________ _______ _________ ________ ___.
____ ________ _____ __________ __________ _____ _____ _______ ___ __________ ___.
_____ _________ ____ ____ _____ ____ ___.
______ ____ ______ ____ ____ __________ _________ _____.
_________ ____ ___ ____ ____ __________ _________ ____ ______ _________ ____ ___.
______ ____ _____ _________ __________ ________ ______ __________ ______ ___ _______.
______ _______ ___ __________ ______.
____ _____ ________ ____ ___ ________.
_______ _______ ____ ________ ______ _________ ___ _________.
_____ __________ __________ _______ _________.
______ ______ ___ ______ ________.
______ ________ ___ ____ ___ ____ ________ ________ __________ ________ ___.
________ _______ ________ __________ _____.
_________ ______ __________ ________ _______.
___ ____ ________ ____ ________ __________ ____.
__________ ________ _____ _______ __________.
_________ ________ __________ ________ ______ ________ ____ _____ ________.
_________ _________ __________ _______ _______.
_______ _______ _______ ______ _____ ______ _________.
________ __________ ___ _____ _________ ________ ______.
___ ______ ___ __________ ___ _______ _____ ______ ________ ________.
Skip in 10
In C++, employee details can be read from the user by declaring suitable variables for storing information such as employee ID, employee name, department, designation, age, salary, and contact details. The `cin` statement is commonly used to accept input from the keyboard, while `getline()` is useful when the employee name or other information contains spaces. For multiple employees, arrays, structures, or classes can be used to store and process the records efficiently. A simple approach is to define a structure named `Employee`. A structure allows different types of information to be grouped together under one name. For example, an employee record may contain an integer employee ID, a string for the employee name, a string for the department, a string for designation, an integer for age, and a floating-point value for salary. ```cpp #include #include using namespace std; struct Employee { int employeeId; string name; string department; string designation; int age; double salary; }; int main() { int n; cout << "Enter number of employees: "; cin >> n; Employee emp[100]; for (int i = 0; i < n; i++) { cout << "\nEnter details of Employee " << i + 1 << ":\n"; cout << "Employee ID: "; cin >> emp[i].employeeId; cin.ignore(); cout << "Name: "; getline(cin, emp[i].name); cout << "Department: "; getline(cin, emp[i].department); cout << "Designation: "; getline(cin, emp[i].designation); cout << "Age: "; cin >> emp[i].age; cout << "Salary: "; cin >> emp[i].salary; } cout << "\nEmployee Details\n"; for (int i = 0; i < n; i++) { cout << "\nEmployee " << i + 1 << endl; cout << "Employee ID: " << emp[i].employeeId << endl; cout << "Name: " << emp[i].name << endl;
__________ ______ ___ _____ ____ ______.____ __________ _______ _______ _______ ______ ____.
_________ _______ _____ __________ _______ ___ ____ _______ __________.
______ ____ ___ _________ _______ ___ ______.
______ ________ ________ ___ ______ ____ ______ ______.
__________ _____ __________ ________ ______ ______.
______ ____ ___ ________ _________ _________ ______ ____.
__________ ______ _________ _______ ________ _________.
_________ ____ ____ ___ ___ _______ _______ __________ _________.
_____ __________ ____ ___ ___ _____ _________ ____.
__________ _______ __________ ____ _____.
___ __________ __________ _____ __________ ___ __________ ____.
_____ _______ ______ _______ ______ ___ ____ ________ _______ _______.
__________ _____ _______ _____ _____ ______ _______ _______ ____ ________.
___ _________ _______ __________ ___.
_________ __________ _______ __________ ___ ________ _____ __________ __________ _________ ________.
__________ ___ ____ __________ ______.
____ ___ _____ _____ _____ ____ ____ ________ ______ _____ ___.
_______ _________ __________ ______ ______ ___ ______ ________ __________ ________ ______ ________.
__________ ___ ____ ______ _________.
_______ ________ ____ ____ ______ ________ _________.
___ ______ ____ ______ _______ _____ ______ ___ __________.
___ __________ _____ ________ _______ ____ __________ _________ _______ _______ _______.
_____ _________ __________ _____ ______ ____ ________ _______ ________.
_____ ______ _______ _________ ________ ___ ____ _________ ______ _______ __________.
______ ____ ___ ___ ______ ____.
_____ ________ ___ __________ _____ ________ _______ ___.
___ _______ _________ ____ ___ _________ ___ ______ ______.
____ __________ ____ _______ _____ _____ ______ ____ _____ _________ _____.
______ ____ ____ ________ _______ ______ ____ ___ ____ ______ ________.
_________ _______ __________ _____ ____ _________.
______ _______ _______ _______ _______ _______ ___ _____.
_______ ________ ________ __________ _________ ______ ___.
_______ _________ _____ ______ _______ _______.
________ _________ __________ ________ __________ _______ ___ __________.
_______ ____ _____ ________ ______ ________ __________ ____ _______ ____ __________ _________.
_________ _________ _________ ______ _____ ______ _______ ____ _______ ___ ___ __________.
__________ _______ ______ ____ _____ __________ ____ ____ __________ ______ ________ ______.
__________ ___ ___ _______ ______ _________ _________ ______ ______ ________ ___ ____.
___ ____ _______ __________ ______ ______.
____ _______ ________ ___ ___ _______ _______ ___.
___ ________ __________ __________ ________ _______ ____ _______ ___.
_____ ________ ______ ___ _________ ______.
__________ _____ _______ _____ _____ _____.
__________ ________ ______ ________ ______.
________ ______ __________ __________ __________ ______ ___ __________ ____ _____.
___ _______ ____ _______ _________ ________ __________ __________ ______.
________ ______ ___ __________ __________ ____ _____ _______ ___ ___ ______.
_____ ______ ______ _______ __________ _______.
___ ________ __________ _____ ___ ______ ___ ___.
_________ ___ _________ _____ __________ _______ _________ ___ _________ _________ ______.
____ ______ _________ __________ ________ ________ ____ _____ _____.
_______ ____ _________ ____ _______ _________ ________ ____.
_________ _____ _______ _____ __________ _________ _______.
_____ _________ _________ ___ ______ __________ ______ __________ _______ _________.
___ _____ ____ _________ ______ ______ _____ ___.
__________ ________ ______ __________ ____ _______ _____ _____ ______ _______.
______ _______ _____ __________ ____ ___.
____ _______ ____ ______ ____ _______ ___ _____ ________ ____ ____ ________.
________ _____ _________ ______ ______ _______ _________ _______.
___ _______ _____ __________ _______ ____ ________ _____.
_______ ________ ____ __________ ____ _____ _______ _____ _______ _____ ______.
_____ __________ ________ ________ ________ ____ ______ _____ __________ ______.
___ _________ _________ _______ ______ ___ ___ _________ _______ ___ _______.
______ __________ _____ ___ ___ _____ ___ __________ _________ ______ _____ ___.
___ ____ ________ _______ ____ _________ ____ ________ ___.
________ __________ ____ ________ ____ ____ ______.
_____ _____ _________ _________ __________ _____ _________.
___ ______ _______ ___ _____ _______ ___ ____ _______ __________ __________ ____.
________ _______ ___ ______ __________ _______ ______ ____ ______ _______ _________.
_______ ________ ______ __________ ____ ______ __________.
_________ ______ ___ _______ _______ ______ __________ _____ ______ ________ ________.
_________ ___ _________ __________ _____ _________ ____ ________ _________ _______ _________ ___.
___ __________ __________ ___ _________ __________ ______ _______ _________ _____ __________.
_________ _______ ____ ________ __________ __________ ________ ___ ____.
____ __________ _________ ___ ____ _____ ____.
______ _______ ____ _____ ________ ________ _________.
________ _______ __________ ________ ________ ____ _____ _______ ______ ______ _______.
____ ________ __________ ________ _____ ___ _______ ___ _______ ______.
________ ________ _________ _______ ___.
____ _____ ____ ______ _______ _________ _______ _________.
___ __________ ______ ___ ____ ______ ____ ___.
____ ___ ___ ________ ____ ______ ___ ____ _______ ________ ___.
_____ ________ ___ _______ ___ _____ ____ ___ ___ ______ ______.
____ ____ ___ ____ ___ _________ _______ __________ _______ __________ ________ _______.
________ ___ _______ ____ ____ _______ ______.
______ ______ _______ __________ _______ _______ ____ _______ _______ __________ ____.
_______ _________ ______ _____ ________ ____ ______ ___ ______ _______ ____ __________.
__________ _______ _______ ______ _______ __________ ________ _______ _________ ________ ___.
____ ________ _____ __________ __________ _____ _____ _______ ___ __________ ___.
_____ _________ ____ ____ _____ ____ ___.
______ ____ ______ ____ ____ __________ _________ _____.
_________ ____ ___ ____ ____ __________ _________ ____ ______ _________ ____ ___.
______ ____ _____ _________ __________ ________ ______ __________ ______ ___ _______.
______ _______ ___ __________ ______.
____ _____ ________ ____ ___ ________.
_______ _______ ____ ________ ______ _________ ___ _________.
_____ __________ __________ _______ _________.
______ ______ ___ ______ ________.
______ ________ ___ ____ ___ ____ ________ ________ __________ ________ ___.
________ _______ ________ __________ _____.
_________ ______ __________ ________ _______.
___ ____ ________ ____ ________ __________ ____.
__________ ________ _____ _______ __________.
_________ ________ __________ ________ ______ ________ ____ _____ ________.
_________ _________ __________ _______ _______.
_______ _______ _______ ______ _____ ______ _________.
________ __________ ___ _____ _________ ________ ______.
___ ______ ___ __________ ___ _______ _____ ______ ________ ________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.