20 lines · c
1#include <stdio.h>2#include <stdlib.h>3#ifdef _WIN324#include <direct.h>5#else6#include <unistd.h>7#endif8 9int main(int argc, char const *argv[], char const *envp[]) {10 for (int i = 0; i < argc; ++i)11 printf("arg[%i] = \"%s\"\n", i, argv[i]);12 for (int i = 0; envp[i]; ++i)13 printf("env[%i] = \"%s\"\n", i, envp[i]);14 char *cwd = getcwd(NULL, 0);15 printf("cwd = \"%s\"\n", cwd); // breakpoint 116 free(cwd);17 cwd = NULL;18 return 0; // breakpoint 219}20