The document discusses different types of pointers in C++. It defines a pointer to constant as a pointer where the data pointed to cannot be changed, though the pointer itself can point to different locations. A constant pointer to constant is defined as a pointer that cannot change the address or value of the variable it points to. Finally, a constant pointer is a pointer that always points to the same fixed memory location, even if the value at that location can be changed.
The document discusses different types of pointers in C++. It defines a pointer to constant as a pointer where the data pointed to cannot be changed, though the pointer itself can point to different locations. A constant pointer to constant is defined as a pointer that cannot change the address or value of the variable it points to. Finally, a constant pointer is a pointer that always points to the same fixed memory location, even if the value at that location can be changed.
The document discusses different types of pointers in C++. It defines a pointer to constant as a pointer where the data pointed to cannot be changed, though the pointer itself can point to different locations. A constant pointer to constant is defined as a pointer that cannot change the address or value of the variable it points to. Finally, a constant pointer is a pointer that always points to the same fixed memory location, even if the value at that location can be changed.
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)