I would approach it with arrays. The overall range of the numbers is 1 - 1000. Get the width from the user. If he enters 10 there will be 100 classes (which would be 0 - 9, 10 - 19 etc), if he enters 100 there will be 10 (0 - 99, 100 - 199 etc.). In general then the number of classes will be 1000/width. (Or you could ask them to enter the number of classes they want, and deduce the "width" instead).

Once you have the number of classes allocate an array of that length using malloc or calloc:

int *class;

class=calloc(classnum,sizeof(int));

Then read through the file and increment the appropriate class for each number:

/* num is number from file */

++class[num/classnum];

When you have processed all the number the frequency will be contained in each array element and each class can be conceptually printed as:

/* i is the class number */

class i:

Lower limit i*width

Upper limit (i+1)*width-1

frequency class[i]

I'm not sure what the Prop represents.

Once you have the number of classes allocate an array of that length using malloc or calloc:

int *class;

class=calloc(classnum,size

Then read through the file and increment the appropriate class for each number:

/* num is number from file */

++class[num/classnum];

When you have processed all the number the frequency will be contained in each array element and each class can be conceptually printed as:

/* i is the class number */

class i:

Lower limit i*width

Upper limit (i+1)*width-1

frequency class[i]

I'm not sure what the Prop represents.