1. What two Linux commands provide the visual of where you are and what files you have in your current directory?
  2. To create a file on Linux called hello.cpp, what do you type?
  3. What does the "&" do at the end of a line?
  4. How do you copy and paste in Linux?
  5. Before you run code, what two steps do you have to do first?
  6. If we have one file called file.cpp, how do we compile it.


  1. Declare a twoD array of integers with 5 rows and 2 columns.
  2. Declare a twoD array of strings with 100 rows and 20 columns.
  3. Declare and initialize in one statement an array with the following contents:
    1 3 4
    5 6 2
  4. Use a nested "for" loop to cycle through the twoD array declared in question 1 and initialize all the values to 999.
  5. What would be the function prototype for a function called setValues that takes two arguments: a twoD integer array of size 5 x 2 and a integer value.
  6. What would the function call in main look like. You can use the array declared in step 1.
  7. Are arrays passed by value or by reference to functions? What does this mean?
  8. We have two .cpp files: main.cpp and myfunct.cpp and a header file called myfunct.h
    1. What is in myfunct.h?
    2. How do we tell the compiler to include the header file in main.cpp and myfunct.cpp?
    3. If we wanted to separately compile a file called main.cpp, what would we type?
    4. We want to separately compile a file called myfunct.cpp, what would we type?
    5. What two files have been produced from the above two compile commands?
    6. How do we create our executable?


  1. What will the readArray function do?
  2. What will the printArray function do?
  3. What will the sumArray function do?
  4. Why does the sumArray have three 2D arrays as arguments?
  5. What do you have to remember to "include" in both .cpp file?
  6. What will the name of your executable be?
  7. To save yourself from typing all the input, what can you do?