#include #define MAXSTRING 100 int main(void) { char file_name[MAXSTRING]; int c; FILE *ifp; fprintf(stderr, "\nInput a file name: "); scanf("%s", file_name); ifp = fopen(file_name, "rb"); /* binary mode for ms-dos */ fseek(ifp, 0, 2); /* move to the end of the file */ fseek(ifp, -1, 1); /* back up one character */ while (ftell(ifp) >= 0) { c = getc(ifp); /* move ahead one character */ putchar(c); fseek(ifp, -2, 1); /* back up two characters */ } return 0; }