#include<stdio.h>#include<conio.h>int main() { long size; char c[1]; char readfile[200]; printf("Please type the name of the file which size you're interested in:\n"); fgets(readfile,sizeof(readfile),stdin); printf("\nYou chose: %s", readfile); FILE * fp = fopen(readfile,"rb"); if (fp==NULL){ perror("Error with opening the file!");} fseek (fp, 0, SEEK_END); size=ftell(fp); rewind(fp); fclose(fp); printf("In which format do you want to see the size of the file?" "\n1 - Bytes" "\n2 - KiloBytes" "\n3 - MegaBytes\n"); c=getchar(); printf("\nThe size of the file is:"); if (c=='1'){ printf("%.2e bytes", size);} else if (c=='2'){ printf("%.2e kilobytes", size/1024);} else if (c=='3'){ printf("%.2e megabytes", size/(1024*1024));} else{ printf("Wrong number, bastard!");} printf("\nExit: Press ENTER!"); getchar();return 0;}