Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

What is A free product or gift?

Answered: 1 week ago