why is the number read differently than the number write
for (int i = 0; i < 100; i++) {
    int num = random() % 100;
    fwrite(&num, sizeof(int), 1, fp);
}
for (int i = 0; i >= 0; i++) {
    int loc = random() % 100;
    fseek(fp, loc, SEEK_SET);
    int num;
    fread(&num, sizeof(int), 1, fp);
    fprintf(stderr, "%d ", num);
}