Con la funzione:
codice:
char *getcwd(char *buf, size_t size);
Ritorna buf se tutto OK, NULL se fallisce!