
#include <stdio.h>

int main(int argc, char ** argv)
{
	if (argc == 1) {
		printf("missing argument!/n");
		return 1;
	}
	
	char buf[512];
	FILE * fp;
	size_t count;

	fp = fopen(argv[1], "r");
	if (fp == NULL) {
		printf("error on opening!");
		return 2;
	}

	count = fread(buf, 512, 1, fp);
	printf("read %d bytes.", count);

	fclose(fp);

	return 0;
}
