Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program that will take a number of command line arguments. It will be able to receive any combination of strings and integers

Write a C program that will take a number of command line arguments. It will be able to receive any combination of strings and integers. Assume there will be no more than 100 arguments sent to the program.

This program should:

1. Sum up all integers it receives and output total

2. Each string should be checked to see if it's a substring of any future string and will output each time this occurs.

3. Program must have 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

4. Include a makefile

Example:

$ make

1 2 3 4 one hund onehund onehundred 5 6 7

will output :

Sum of integers: 28

one is a substring of onehund

one is a substring of onehundred

hund is a substring of onehund

hund is a substring of onehundred

onehund is a substring of onehundred

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

Which of the following is considered data? ( Check All That Apply )

Answered: 1 week ago