#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int args, char *argv[]) {
int i = 0;
for (i = 0; i < args; i++)
printf("\n%s", argv[i]);
return 0;
}
As of now this program prints out whatever is written on the command line. How would I make it do this in reverse? For example, if I input "dog" it should say "god".