Question: a) Write a complete C program that takes two arguments on the command line when it is run: a string and a number. The second

 a) Write a complete C program that takes two arguments on

a) Write a complete C program that takes two arguments on the command line when it is run: a string and a number. The second argument is represented by the last two digits of your student ID. The program replaces each of the string characters in an: even position with the *character, if the second program argument is an even number (for this purpose, zero is assumed to be an even number) or, odd position with the 'S' character, if the second program argument is an odd number. The program then displays the altered string. Notes: 1. You can assume that the input string is always less than 15 characters long. 2. You can also assume that the program's user always provides 2 arguments when running the code, which makes use of the main function's arguments. 3. You must use appropriate string related functions to achieve the program's functionality. 4. The program's variables must be sensibly named. 112 marks1

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!