random generate number between 0 and 99 to a binary file

int main(int argc, char **argv) {
    if (argc != 2) {
        fprintf(stderr, "Usage: write_test_file filename\n");
        exit(1);
    }

    FILE *fp;
    if ((fp = fopen(argv[1], "w")) == NULL) {
        perror("fopen");
        exit(1);
    }
    int error = 0;

    // TODO: complete this program according its description above.
    for (int i = 0; i < 100; i++){
        error = fwrite(random(99), sizeof(long), 1, fp);
        if(error != 1){
            fprintf(stderr, "Written Error");
            return 1;
        }

    }




    fclose(fp);
    return 0;
}
