Lab 4: Arrays and Pointers
Closed this issue · 0 comments
glennlopez commented
Arrays and Pointers
Unit Objectives:
The student will be able to:
- Distinguish between integer and character arrays.
- Describe how an array of characters differs from a string array.
- Describe how both an array and a pointer can be used together.
- Distinguish between an address of a variable and a variable.
- Use the “address of” and “dereferencing” operators in a program.
- Use both array subscripts and pointers, to access array elements.
- Use pointer arithmetic to modify pointer values.
- Copy the contents of one array to another.
- Use the “watch” window to examine variables while debugging.
- Describe a program’s operation using pseudo-code.
In this unit student should do the following: 1. Read “C by Example”, chapters 4, 19 (p.324-334), 20 and 21. These chapters discuss arrays and pointers. 2. Read the handout on “Pseudo-code”. 3. Answer the questions relevant for the unit 4 from the assignments package on a separate piece of paper. Some of these questions will be marked in class. 4. Do Lab 4, including questions 8.1 to 8.5. Place your pseudo-code, source code and answers to the questions in your Lab Manual. Show your instructor. 5. Demonstrate your functioning program to your instructor and explain its operation.