Lecture 22: More Arrays and Strings
Wednesday, April 18, 2012[Up] [Previous Lecture] [Next Lecture]
Reading Assigned: None
Homework Due: Homework 10
Homework Assigned: Homework 11
Classwork Assigned: None
Topics Covered:
- Homework 10 questions? Solution
- Quiz 4 Topics
- Examples to review array operations
- Simple array initialization and access
- Accessing arrays with loops
- With arrays, it can be useful to use #define for array sizes, see:
- Modified code to use #define for size
- How is the modified program easier to maintain, understand?
- Reminder of why we format our programs correctly
- Remember that array elements can be used just like any other variable
- Example of array elements as variables
- Remember what you can NOT do wirh arrays
- Example of BAD array usage
- Examples to review string behavior
- Review of some debugging strategies
- How can we debug for loops that aren't working right?
- How can we debug a program that gets stuck in a loop?
- What are some methods of program design that can help limit debugging?
- How can program design strategies impact your debugging?