Question: Write a C program that accepts up to seven arguments at the command line prompt. The program should print the last character of any odd

Write a C program that accepts up to seven arguments at the command line prompt. The program should print the last character of any odd numbered arguments, and the first character of any even numbered arguments. The characters printed should be separated by spaces. The program should inform the user of the correct program usage if fewer than two or more than six arguments are provided. Assume each argument contains at least two characters. For example:

Given arguments: prog_m 120 arg2 t200 lista all arg5

Returns: m 1 2 t a a 5

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!