You are on page 1of 16

Pointer to Constant

Presented by : UMAIR ARIF


ROLL NO :108
Definition of Pointer to Constant
• In the pointers to constant, the data pointed by the pointer is constant and
cannot be changed. Although, the pointer itself can change and points
somewhere else.
• As the pointer itself is a variable.
Example (1)
Example(2)
Examples Of Pointer to Constant.
(3)
Example (4)
Constant Pointer To
Constant
Presented by : UMAIR ARIF
Roll No : 108
Definition of Constant Pointer To
Constant.

• A constant pointer to a constant is a pointer, which is a combination of


Pointer To constant and constant Pointer. It can neither change the
address of the variable to which it is pointing nor it can change the value
placed at this address.
Example(1)
Example(2)
Constant Pointer
Presented by : KHURRAM ALI
Roll NO : 110
Definition of constant pointers.
• C++ Constant pointers: In constant pointers, the pointer points to a fixed
memory location, and the value at that location can be changed because it is
a variable, but the pointer will always point to the same location because it is
made constant here.
Example(1)
Example(2)
Example (3)
Example (4)

You might also like