Answers/Solutions to Exercises in Chapter 6, Exercise 3

E3: Let int *p and let int x[4] = {10,11,12,13}. Let p = &x[2]. What is the value of p[2]?

A3: We do not know. Why? p is made to point to x[2], i.e. the word containg 12. Hence p+1 points to the word containg 13, and p+2 points right to the next word, which we have no idea what it contains.

Back to Answers/Solutions Index                          Back to Answers/Solutions for Chapter 6 Index