Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C-program, please write code needed to complete both parts 2 and 3 as they are connected, Thank you. Deliverable 2: Use of arge and argy

C-program, please write code needed to complete both parts 2 and 3 as they are connected, Thank you. image text in transcribed
Deliverable 2: Use of arge and argy Write a program that accepts a person's name and one or more options when the program runs. The program should print a welcome message with the person's name. If - is included as an option, print the message "The long option is selected". If -r is included as an option, print five random integers between 0 and 99. Ignore other options, and only print the message for each option once. Example outputs when the program is run with different inputs: ./deliverable2 Andy -a Welcome Andy ./deliverable2 Andy -a -1 - Welcome Andy The long option is selected ./deliverable2 Andy -a -1 - -1 -T Welcome Andy The long option is selected R is for random. Here are five random numbers. 30 85 23 56 Hint: The function stropy copies strings, and the function strcmp compares strings. Hint: To get random values, you may need to see the random number generator. You can seed it with the timestamp value. To do so, add the following lines. #include time_t t; srand((unsigned) time(kt)); Deliverable 3: Make Write a Makefile for compiling the program for deliverable two. To use your Makefile to compile the program, you can just use the command make

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

More Books

Students also viewed these Databases questions