Question: C PROGRAMMING Part 2: echo with a twist Write a program, named twecho, that takes words as command line arguments, and prints each word twice,
C PROGRAMMING



Part 2: echo with a twist Write a program, named "twecho", that takes words as command line arguments, and prints each word twice, once as is and once all-capitalized, separated by a space. For example, ./twecho hello world dude should output: hello HELLO world WORLD dude DUDE Your program should handle any number of arguments. You can receive the command line arguments if you start your main() function in the following way: int main(int argc, char **argv) Please refer to section 5.10 in K&R2. In particular, the picture on page 115 depicts clearly how the command line argument strings are stored in memory. Here are some requirements and hints: - You must use the main() function exactly as given below. You CANNOT modify the main function. Your job is to implement other functions that main() calls. int main(int argc, char **argv) { if (arge #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
