Home > SparkNotes > Computer Science Study Guides > Memory >

sparknotes

Arrays: Memory


Problems and Solutions 2

Problem : What dimensions do you need to know to determine the value of arr[3][5][7] using only pointer arithmetic and the dereference operator (*)?


Problem : Assuming that the second dimension were SECOND and the third dimension were THIRD, calculate the value of arr[3][5][7] from the pointer arr using pointer arithmetic and the dereference operator.


Problem : As an exercise, write some code that will print out all of the integers in the integer array without ever using the square brackets to index into it. There are n integers in the array arr.