Question
Objectives Work with File I/O Work with 2 dimensional arrays Description: You are to read a file of numbers. You will break apart each number
Objectives Work with File I/O
Work with 2 dimensional arrays
Description: You are to read a file of numbers. You will break apart each number into an array (a set). Compare each array of numbers (set) to tell me if one is the subset of another.
Requirements:
ANSWER MUST BE IN C
No more than 10 sets will be in the file
No more than 5 numbers in a set
There are no 0s in the number sets, so you can use that as a delimiter if you wish.
You must read in the file: /public/lab2/sets.txt
You must read in the numbers as long integers because one of the numbers is larger than an integer.
You must break them up into single digits and put each integer into an array for that set.
Must check that you can open the input file. If not, print error (using perror) and return or exit program with a 1.
DO NOT USE GLOBALS. Must have at least 2 functions besides main. MUST COMPILE WITH -Wall
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