Question
PLEASE CODE THE FOLLOWING IN C, Thank you. main calls the following functions: - readFile - insertionSort - printRange - writeFile #include #include #include #define
PLEASE CODE THE FOLLOWING IN C, Thank you.
main calls the following functions:
- readFile
- insertionSort
- printRange
- writeFile
#include
#include
#include
#define NAME_SIZE 64
#define INPUT_SIZE 100
#define FLUSH while( getchar()!= ' ')
typedef struct
{
int rank;
char name[NAME_SIZE];
int year;
int numStud;
}COLLEGE;
void readFile(const char inFileName[], COLLEGE list[], int *count);
void insertionSort(COLLEGE list[], int count);
void printRange(const COLLEGE list[], int count);
void writeFile(const char outFileName[], const COLLEGE list[], int count);
int main( void )
{
COLLEGE collegeData[INPUT_SIZE];
char inFileName[NAME_SIZE] = "in.txt";
char outFileName[NAME_SIZE] = "out.txt";
int count; // actual number of colleges
return 0;
}
in.text
3 Santa Barbara City College; 1909 30687 5 Pasadena City College; 1924 22000 14 West Hills College - Coalinga; 1932 4000 7 Napa Valley College; 1942 8996 2 Orange Coast College; 1947 25000 15 Palo Verde College; 1947 3898 4 Diablo Valley College; 1949 24781 6 Foothill College; 1957 18362 12 College of the Siskiyous; 1957 2473 10 Cuesta College; 1963 9571 8 Ohlone College; 1965 18000 1 De Anza College; 1967 24781 11 Feather River Community College District; 1968 1635 13 Lake Tahoe Community College; 1975 3000 9 Irvine Valley College; 1985 14384
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started