Pre-lab 3 questions
Name:
Cnet ID:
Lab start time:

Note: There may be more than one answer. Make sure you leave
all that apply.
1. What are the common uses of #define?
(Remove any answers that are not true)
      a) making sure a .h file is not read twice during a single compilation pass.
      b) create new types
      c) defining constants to use throughout the program
      d) turning on and off debugging statements
      e) writing spaghetti code

2. Which are true statements about statically-allocated arrays (e.g. int x[3][4])?
(Remove any answers that are not true)
      a) These may be safely returned from function calls.
      b) Passing this array into a function will pass the address of the beginning element, not copy the entire array. Therefore, any changes made inside the function will be present after the function ends.
      c) You can change the size of an array if you wish by redeclaring it.
      d) Arrays and pointers are very related.
     

3. Fill in the statements about statically-allocated array int ar[5][6]?
      a) The last item in the first row of ar is: ar[  ][  ]
      a) The last item in the last row of ar is: ar[  ][  ]
      a) The first item in the last row of ar is: ar[  ][  ]