Professional Documents
Culture Documents
UNION
UNION
Flowchart :
SOURCE CODE :
#include <stdio.h>
struct Worker {
char name[50];
int workerID;
float hourlyRate;
};
int main() {
// Create an array of records that can store both managers and workers
union Record employees[5]; // Assuming there are 5 records for
demonstration
fclose(managerFile);
fclose(workerFile);
return 0;
}
OUTPUT :