#include <stdio.h>

int main() {
    FILE *file = fopen("./hi/hello.txt", "w"); // Open file in write mode

    if (file == NULL) {
        printf("Error opening file!\n");
        return 1;
    }

    fprintf(file, "1234"); // Write "1234" to the file
    fclose(file); // Close the file

    // Now, try reading the file
    file = fopen("hello.txt", "r");
    if (file == NULL) {
        printf("File not found!\n");
        return 1;
    }

    char content[10];
    fgets(content, sizeof(content), file);
    fclose(file);

    printf("File created successfully. Content: %s\n", content);
    return 0;
}
