Question: In C, and please use struct In C, What to do? Write a C program myprog2 that can accept an arbitrary number of command line

In C, and please use struct  In C, and please use struct In C, What to do?

In C, What to do? Write a C program myprog2 that can accept an arbitrary number of command line arguments, eg myprog2 hello world! myprog2 must do the following: 1. myprog2 needs to split each of the arguments into two halves based on the length of a string. Specifically, the first half will be [0, n/2) and the second half will be [n/2] where n is the length of the string and n> 1. For instances, hello is split into two halves: he and 1lo. Similarly, world! is split into wor and ld! For the case where n-1 (i.e., the length of the argument is 1, there will be only first half which is the argument itself 2. All the arguments split into two halves will be sorted in the lexicographical order. 3. Finally, all the sorted halves in the previous step will be printed. For the parameters specified above, myprog2 must produce the following output: he ld! 11o wor

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!