CS208 Introduction to Computer Systems Wednesday, 15 Feb 2023 + Questions - '\0' has type char NULL has type void* + Debugging C programs - VS Code - gdb + Memory management in the shell - argv char *argv[] argv[0] --> "ls\0" argv[1] --> "-l\0" argv[2] == NULL - Set up argv get user input "ls -l" count argc (==2) allocate argv char *argv[argc+1] insert \0's "ls\0-l\0" point argv[k] to appropriate places + Redirection - File descriptors - dup2 - pipe