main.c
int writeInt(const char *file_path, int val) {
    FILE *fd;

    if (!(fd = fopen(file_path, "w"))) {
        fprintf(stderr, "could not open %s for writing: %s\n", file_path, strerror(errno));
        return 0;
    }

    fprintf(fd, "%d", val);

    if (fclose(fd) != 0) {
        fprintf(stderr, "could not close %s: %s\n", file_path, strerror(errno));
        return 0;
    }

    return 1;
}
// writeInt writes integer into the file, returns 1 in case of success and 0 in case of failure
writeInt writes integer into the file, returns 1 in case of success and 0 in case of failure
writeInt writes integer into the file returns 1 in case of success and 0 in case of failure
int writeInt(const char *file_path, int val) {
    FILE *fd;
    if (!(fd = fopen(file_path, "w"))) {
        fprintf(stderr, "could not open %s for writing: %s\n", file_path, strerror(errno));
        return 0;
    }
    fprintf(fd, "%d", val);
    if (fclose(fd) != 0) {
        fprintf(stderr, "could not close %s: %s\n", file_path, strerror(errno));
        return 0;
    }
    return 1;
}
int writeInt ( const char * file_path , int val ) { FILE * fd ; if ( ! ( fd = fopen ( file_path , " " ) ) ) { fprintf ( stderr , " \n " , file_path , strerror ( errno ) ) ; return 0 ; } fprintf ( fd , " " , val ) ; if ( fclose ( fd ) != 0 ) { fprintf ( stderr , " \n " , file_path , strerror ( errno ) ) ; return 0 ; } return 1 ; }
writeInt writes integer into the file, returns 1 in case of success and 0 in case of failure
writeInt writes integer into the file returns 1 in case of success and 0 in case of failure