Posted On: Jan 09, 2021
Constant pointer refers to a particular variable in its lifetime while a Constant variable always contain same value in its life time.
A constant variable is a variable to which value can be assigned only once. Any try to change its value through any operation or reassignment would result in an error.
A constant pointer is a pointer pointing to fix memory location. Here the value of location can be changed but the pointer will remain to point to that memory location only. Any attempt to modify the pointer or any try to alter the location it is pointing will result in an error.
Never Miss an Articles from us.