#include #include #include #include #include #include struct cat_struct { char name[16]; int age; int catches_per_month; }; void print_cat(struct cat_struct *toprint){ printf("Name: %s\nAge: %d\nCatchesPerMonth: %d\n", toprint->name, toprint->age, toprint->catches_per_month); } void main(int argc, char ** argv){ int fd = open(argv[1], O_RDONLY); struct cat_struct our_cat; read(fd, &our_cat, sizeof(our_cat)); close(fd); print_cat(&our_cat); }