To gain a thorough understanding of pointers.
- Submit the exercise code you worked on during class.
In a text file assignment7.txt
, answer the following questions:
- Explain the difference between
++*p
,*p++
and*++p
. - How would the NULL pointer be represented in terms of its data type and value? Your answer should be in a format such as
(int) 3
or(char) c
. Please also include an explanation. - What are use cases for NULL pointers?
- Can you subtract pointers? Can you add them? Why would you?
- What is the difference between the following declarations:
int* arr1[8];
int (*arr2)[8];
int *(arr3[8]);
Please include your name and a description in a comment at the top of your code files. Please also include your name at the top of your assignment7.txt
file.
All files must be submitted via GitHub by 10:10am 8/2.