int main (void) { int fd = open("path_name.c", O_RDONLY); // the file is now open, you just need to read it return (0); }