Question: write a c program that does this: create 2 files that store: + list of number, each per line + -1 will be a marker
write a c program that does this:
create 2 files that store:
+ list of number, each per line
+ -1 will be a marker to end the data
+ all value in the file will >=0 other than the -1 marker
for example:
fileA:
3
2
4
-1 (marker end the list of data)
fileB:
1
2
3
0
-1 ( marker end the list of data)
create a function:
void printdata( int arr[ ] )
this function will read file from user( here example will be fileA and fileB)
when run the program ./a.out fileA fileB
it will read both file and print out all the data but not including -1 since it a marker to end.
fileA:
3
2
4
fileB:
1
2
3
0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
