Question
reverse_echo is a variant of a standard Linux command: echo. In echo command, arguments passed from command line are printed out, separated by spaces, with
reverse_echo is a variant of a standard Linux command: echo. In echo command, arguments passed from command line are printed out, separated by spaces, with newline character at the end. reverse_echo does the same, except the arguments entered at the command line are printed out in reverse order. If he executable is renamed as reverse_echo and you type the following to run it: ./reverse_echo testing 1 2 3 the program will print out the following: 3 2 1 testing
Compile Instructions: gcc -Wall -o reverse_echo reverse_echo.c Run Instructions: ./reverse_echo ...
Goal: Add the code to the for loop in the reverse_echo.c file so that the program behaves according to the description.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// reverse_echo.c //
#include
int main(int argc, char *argv[]) {
int i;
printf("argc is: %d ", argc);
// finish the rest of the for loop
for {
}
printf(" ");
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started