#include #include void main(int argc,char *argv[]) { FILE *dump_me; int i; int x = 0; if(argc<2) { puts("Format: DUMP filename"); exit(0); } dump_me = fopen(argv[1],"rb"); if(dump_me==NULL) { printf("Error opening %s\n",argv[1]); exit(1); } while((i=fgetc(dump_me))!= EOF) { printf("%0.2X ",i); x++; if(!(x%16)) putchar('\n'); } fclose(dump_me); printf("\n%s: size = %u bytes\n",argv[1],x); }