Pointer Arithematic

Pointers and Arrays: const Pointers : We can create a ordinary const variable by using following syntax : const

One of the most important characteristics of a const variable is that, once they have been assigned with some values, that value could not be changed at any point of time throughout the whole program. For example in the above statement MyVar is a const variable and its value could be reinitialized or changed again i,e we can’t write following statement after we have declared MyVar as const : Likewise we can have out pointer variables also as const pointer variables by using the same syntax as above with a slight modification, such as : More precisely : After we have declared a const pointer, we can’t change its address any how, at any point of time in a program. So writing the following codes would cause errors: