Assume that the maximum number of employees working in a company is 100 and all employees have personnel numbers (ID) between [1-999999]. Employees' numbers (IDs) will be stored in an array of size...


Write a C program for this question


Assume that the maximum number of employees working in a company is 100 and all<br>employees have personnel numbers (ID) between [1-999999]. Employees' numbers (IDs)<br>will be stored in an array of size 100 .<br>Assume that the ID of a personnel is 15426, then 15426 % 100 = 26 will be calculated<br>and this ID will be assigned to the 26th index of the array. If an ID has already been<br>assigned here, 15426 will be assigned to the 27th index of the array. If 27th index is also<br>full, then an empty space must be searched by increasing the index number and the ID<br>must be assigned when an empty space is found. (If the 99th index is reached when<br>searching empty space, return to the index 0 and continue to search an empty space.) If all<br>elements of the array are full, then the program must print an output indicating that

Extracted text: Assume that the maximum number of employees working in a company is 100 and all employees have personnel numbers (ID) between [1-999999]. Employees' numbers (IDs) will be stored in an array of size 100 . Assume that the ID of a personnel is 15426, then 15426 % 100 = 26 will be calculated and this ID will be assigned to the 26th index of the array. If an ID has already been assigned here, 15426 will be assigned to the 27th index of the array. If 27th index is also full, then an empty space must be searched by increasing the index number and the ID must be assigned when an empty space is found. (If the 99th index is reached when searching empty space, return to the index 0 and continue to search an empty space.) If all elements of the array are full, then the program must print an output indicating that "the array is full". The function that adds records should be given in the form below. This function returns the index number to which the ID is assigned. It must return -2 if the array is full. int Insert(int A[ ], int ID); #define N 100 #define FAIL #define EMPTY -2 -1 for (i=0; i

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here