In-class Examples for CISC-1600-E01 and CISC-1610-E01

  1. Definitions: computer, program, language, superset, subset.
  2. Output to cout
  3. Connect to storm.cis.fordham.edu from room 317 Keating.
    1. Connect
    2. Explore the directories in storm.cis.fordham.edu using cd, pwd, and ls -l.
    3. Download, compile, and execute a C++ program using wget and c++.
    4. See the C++ program and its output on the web
    5. Clean up: how to remove a file
    6. Practice using the Linux vi (“visual”) editor
  4. Variables and input.
  5. The other built-in data types.
  6. Expressions and how to compute their value.
  7. Division, quotient and remainder.
  8. Operators that have a side effect.
  9. Expression exercises.
  10. Control Structure: the most important part of the course.
    1. Loops:
      1. while
      2. for
      3. do-while
    2. Nested loops: the crown jewels 👑
    3. if statements
      1. if statements and nested if statements
      2. if/else statements
      3. switch as an alternative to if
      4. An if statement in a loop
  11. Arrays. An array is a set of mass producted variables (maybe thousands of them), all of the same data type.
    1. Many individual variables vs. one big array
    2. An array of strings
    3. Initialize, copy, and assign to an array. A range for loop.
    4. One-dimensional arrays: searching and sorting
    5. Two-dimensional arrays
    6. Parallel arrays and arrays of structures
  12. Midterm.
    1. review
    2. portmortem
    3. remedial execises
    4. second midterm
    5. second postmortem
  13. Functions.
    1. Don’t write the same code twice.
    2. Scope and Storage Allocation
    3. Arguments and return value
    4. Make the code more localized.
    5. Combine local scope with static allocation.
    6. References: two ways of talking about the same value
    7. Recursion: another way of looping
  14. Pointers.
    1. Display the value of an int in hexadecimal (base 16).
    2. Store the address of a variable into a pointer.
    3. Pointers and loops.
      (This example is intended to motivate pointers.)
    4. Pointer arguments vs. reference arguments.
    5. Pass an array to a function using pointers.
  15. Review for the final exam on Thursday, December 19, 2024.