#include #include #include int main(void) { int fd1; struct stat statbuf; fd1 = open("/tmp/foo", O_WRONLY | O_CREAT); if (fd1 == -1) printf("Error fd1\n"); if (stat("/tmp/foo", &statbuf) == -1) printf("Stat /tmp/foo Error\n"); if (stat("\\tmp\\foo", &statbuf) == -1) printf("Stat \\tmp\\foo Error\n"); if (stat("..\\tmp\\foo", &statbuf) == -1) printf("Stat ..\\tmp\\foo Error\n"); if (stat(".\\tmp\\foo", &statbuf) == -1) printf("Stat .\\tmp\\foo Error\n"); printf("Bye Bye\n"); }