Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #include <errno.h>
- int main(void){
- int a = chdir("ASDASD"); //this directory is meant NOT TO BE EXISTED
- if(a==-1){
- if(errno==ENOENT){
- printf("Directory isn't there\n");
- return -1;
- }
- }
- printf("Done\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement