if((fp=fopen(argv[1],"r"))==NULL)
{
printf("can not open file %s\n",argv[1]);
exit(0);
}
while(fgetc(fp)!=EOF)
count++;
fclose(fp);
printf("file %s contains %d characters ",argv[1],count);
getchar();
}