#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>

int main() {
    struct stat fileStat;

    // Get file information
    if (stat("file.txt", &fileStat) == -1) {
        perror("Error getting file information");
        exit(EXIT_FAILURE);
    }

    // Print file information
    printf("File size: %ld bytes\n", fileStat.st_size);
    printf("File permissions: %o\n", fileStat.st_mode & 0777);
    printf("Last access time: %ld\n", fileStat.st_atime);

    return 0;
}