Question: Write a c program that will take a large number of command-line arguments and do various things with them. It should be able to receive

Write a c program that will take a large number of command-line arguments and do various things with them. It should be able to receive any combination of integers and strings. You can assume there will be no more than 200 arguments sent to your program. This program should: a. Total up all integers it receives and output the total b. Each string should be checked to see if it is a substring of any future string. Output each time this happens. c. Make sure your program has at least one function other than main. This function should be in its own source file and have its own .h header file. You will also need a source file for the main body, so your main.c, func.h and func.c d. [10pt] You must include a Makefile that will build the executable and it should be named deater.

Example: $ deater 5 2 8 dog cat dogc dogcat 7 10 15

should output:

Total integers: 47

dog is a substring of dogc

dog is a substring of dogcat

cat is a substring of dogcat

dogc is a substring of dogcat

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!