How to get the current directory in a C program? - Stack Overflow
https://stackoverflow.com/questions/298510/how-to-get-the-current-directory-in-a-c-program
WEBNov 18, 2008 · To get current directory (where you execute your target program), you can use the following example code, which works for both Visual Studio and Linux/MacOS (gcc/clang), both C and C++: #include <stdio.h>. #include <stdlib.h>. #include <string.h>.
DA: 48 PA: 24 MOZ Rank: 68