Ladder
### Introduction to C Syntax
Below is a flurry of C syntax (we promise it won't be like this for the future exercises).
- At the top of the file we have an `include` statement to include `stdio.h`, a library that contains functions such as printf.
- Next is an array declaration using the `int {name}[{size}]` syntax.
-
This array declared on the `stack`. The distinction between declaration on the stack and heap is important to keep in mind!
- We can initialize the values by using the `{elem1, elem2, ...}` initializer syntax. - We can also assign each element individually to initialize the array. -If we do not assign a value to an element then it takes on garbage data. Be careful!
- We have a `for` loop that iterates over our array -Note that there is no len function to determine the length of an array, so we typically keep track of the length in a variable.
- There's a `printf` statement that formats a string to be printed out. In this case `%d` formats the input into a number. -`printf` is your friend for debugging!
- We can declare a string by using the type `char*` which is a pointer to the first character of the string - In this case we use `%s` inside `printf` to print out strings