ECS 30 Lecture Notes - Lecture 9: Entry Point, Null Character, Memory Address

49 views3 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents