Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a function, int get_num_ints( char ** argv) using C. This function takes in the two input file names (stored in argv) and determines the
Create a function, int get_num_ints(char** argv) using C.
This function takes in the two input file names (stored in argv) and determines the number of integers in each file. If the two files both have N integers, return N, otherwise return -1.
If one or both of the files do not exist, it should exit with EXIT_FAILURE.
input parameters:
char** argv
return parameters:
-1 if the two input files have different number of integers
N if the two input files both have N integers
Do NOT hard-code the file names.
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