Question: 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
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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
