CSC 161 Grinnell College Fall, 2011
Imperative Problem Solving and Data Structures

CSC 161 Module 3: Working with Characters, Strings, and I/O


This module introduces CSC 161 students to writing dynamic programs that can take input and follow commands based on input, including

  1. characters
  2. strings,
  3. input and output.

Day-by-day Details

Day Topic Preparation In-class Due Date Availability
Wednesday, October 5 Module 3: Strings and I/O   Examples    
Friday, October 7 Characters and Strings Kernighan & Ritchie, 1.9, 7.8.1, 7.8.2, B.3 Characters and Strings Lab    
Monday, October 10 Input and Output
  • printf
Kernighan & Ritchie, 1.5, 7.1, 7.2, B.2 (reference) Input/Output Lab    
Tuesday, October 11 More I/O
  • scanf
Kernighan & Ritchie, 7.4
B.1.2, B.1.4 (reference)
I/O Lab Continued    
Wednesday, October 12 Hour Test 2
Friday, October 14 Project   Robot follows typed commands Friday, October 28  
Monday, October 17 - Friday, October 21 Fall Break        
Monday, October 24 Project   Robot follows typed commands Friday, October 28  
Tuesday, October 25 Do ONE of supplemental problem 1 or supplemental problem 2 Tuesday, October 25 BOTH problems may be done for extra credit

Project: Robot Follows Typed Commands

Working in pairs, students should develop a program that includes these elements:

Together with the program, a student pair must write a paragraph that describes what tests are needed to demonstrate the program is working correctly. That is, what should a tester do to demonstrate the program works? Also, the student pair must present a sequence of steps that the tester should do to carry out the test plan. (E.g., what should be typed in a terminal window, including the details of the compile, link, and run steps?)

Command Requirements


This project will be worth 25 points, based on the following rubric:


This project is planned for use as the base of a later project, so you will want to document your code well now — in anticipation of later activities.

This document is available on the World Wide Web as

Created 19 July 2011 by April O'Neill
Last full revision 9 August 2011 by April O'Neill
Dates revised 2 September 2011 by Henry M. Walker
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at