What is const pointer in C?
Printable View
What is const pointer in C?
Const pointer is a pointer that can’t change the address of the variable that is pointing to. Once const pointer is made to point one variable we can’t change this pointer to point to any other variable. This pointer is called const pointer.
The constant pointer cannot modified,the modification made in pointer is not allowed example a const pointer means pointer which address one value if you declare a point inside a function not have scope in outside function.
syntax:
data_type*const pointer_name=initial_address.