Lab 2: Check-in

Before leaving the lab, check in with a TA to validate you and your partner’s understanding of the answers to these questions.

  1. Which pins must be connected to show “3” on the first digit? Which additional pins much be connected to show “3” on all four digits? Why is it impossible to simultaneously show “3” on the first digit and “4” on the second? What trick, then, can you employ to create the illusion of showing “3456” on the four clock digits?

  2. Using the sample Makefile in the lab writeup, trace what happens when you issue make with no command-line arguments: what does make try to build? How does it determine what actions to take?

  3. Identify new test cases you could add to testing.c that would verify whether is_odd returns the appropriate true/false result for negative numbers. What outcome indicates that all your test cases have passed? What happens if one or more fails? How can you determine which of the case(s) is failing? Consider instead if the function bug was that it entered an infinite loop– what then would you expect to be the observed outcome during testing?

Don’t forget to return all tools to the shelves & leave your workspace as clean as you left it!