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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!