1 2 3 4 5 6 7 8 9
#include "pwd.h" int main(void) { char buf[1024]; fprintf(stdout, "%s\n", getcwd(buf, 1024)); exit(EXIT_SUCCESS); }