#include void main (void) { int i; int nx,ny,nz,n; float *fdata; unsigned char *cdata; char filenamein[200], filenameou[200],str[200]; FILE *f1, *f2; printf("\n enter cfb file name:");scanf("%s",filenamein); printf("\n enter volume file name:");scanf("%s",filenameou); f1=fopen(filenamein,"r");if (f1==NULL) {printf("\n input file wrong");exit(0);} f2=fopen(filenameou,"w"); fgets(str,200,f1); nx=atoi(strtok(str," ")); ny=atoi(strtok(NULL," ")); nz=atoi(strtok(NULL," ")); n=nx*ny*nz; printf("\n The no of elements:%d",n); fdata=(float *)calloc(n,sizeof(float)); fread(fdata,sizeof(float),n,f1); cdata=(unsigned char *)calloc(n,sizeof(unsigned char)); for(i=0;i