Add strerror to error test

This commit is contained in:
Jeremy Soller
2018-03-07 21:01:37 -07:00
parent b7b49d5801
commit 1127c36ceb
+3 -2
View File
@@ -1,8 +1,9 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
int main(int argc, char** argv) {
chdir("nonexistent");
printf("errno: %d\n", errno);
chdir("nonexistent");
printf("errno: %d = %s\n", errno, strerror(errno));
}