#include <stdio.h>

int main() {
    FILE *fp;
    char buffer[100];

    // Open a file for reading
    fp = fopen("example.txt", "r");

    // Check if the file was opened successfully
    if (fp == NULL) {
        perror("Error opening the file");
        return 1;
    }

    // Read and display the content of the file
    while (fgets(buffer, sizeof(buffer), fp) != NULL) {
        printf("%s", buffer);
    }

    // Close the file
    fclose(fp);

    return 0;
}