ECS 30 Lecture Notes - Lecture 9: Entry Point, Null Character, Memory Address
Document Summary
You can have two dimensional arrays that has a list of names where each name is technically an array. The max number characters including the null characters is indicated in the second brackets. The 2d array is stored in one block of memory. Functions must get the max number of characters. The array could become a very large waste of space. The main function actually receives two arguments int argc, and char *argv[]. Argc tells you the number of variables you are receiving, and argv tells you what variables stored in a 1d array of char *pointers. Argc is always going to be at least one, and the argv is always going to be its own executable. You can also pass a quote into the arguments so it reads it as one input. Recall that pointers declare variables with * in front, and are memory addresses. The variable can be dereferenced by the * when used in the functions.