Question: A C program testMe.c is compiled to produce the binary testMe. The main function starts with: int main(int argc, char **argv) and the program reads

A C program "testMe.c" is compiled to produce the binary "testMe". The main function starts with: int main(int argc, char **argv) and the program reads its arguments and prints them. (a) If it is called with: /testMe -f myfile.txt What will it print for its arguments (list your answer as argv[0] will be printed as...argv[1] will be printed as... etc.) (b) If instead it is called with: /testMe "-f myfile.txt" > temp What will it print for its arguments (list your answer as argv[0] will be printed as...argv[l] will be printed as... etc.). Explain. (c) Write a simple C program that will, when called with /testMe
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
