const usage with pointers in C

Viewed 14511

I am going over C and have a question regarding const usage with pointers. I understand the following code:

const char *someArray

This is defining a pointer that points to types of char and the const modifier means that the values stored in someArray cannot be changed. However, what does the following mean?

char * const array

Is this an alternate way of specifying a parameter that is a char pointer to an array named "array" that is const and cannot be modified?

Lastly, what does this combination mean:

const char * const s2

For reference, these are taken from the Deitel C programming book in Chapter 7 and all of these are used as parameters passed to functions.

6 Answers
Related