I am trying to write a programed named reverse.c that echoes its command-line arguments in reverse order. But i don't know what is wrong.
If the input is: reverse void and null
The output should be: null and void
Code tags added by Kermi3.Code:#include <stdio.h> #define N 100 main(int argx, char *argy[]) { int i=0, k; char *p[100]; printf("Enter a sentence: "); gets(argy[100]); i++; for(k = i-1; k >= 0; k--) printf("%s", argy[0]); return 0; }