1.

How Const Int *ourpointer Differs From Int Const *ourpointer?

Answer»

As a rule, POINTER declarations should be read from RIGHT to left. In the pointer declaration, const INT *ourPointer, ourPointer is a pointer to a const int object, which cannot be changed by using a pointer. Whereas in CASE of the int const *ourPointer pointer declaration, ourPointer is a const pointer to an int object, in which an int object can be changed by using a pointer but the pointer itself cannot be changed because it is constant.

As a rule, pointer declarations should be read from right to left. In the pointer declaration, const int *ourPointer, ourPointer is a pointer to a const int object, which cannot be changed by using a pointer. Whereas in case of the int const *ourPointer pointer declaration, ourPointer is a const pointer to an int object, in which an int object can be changed by using a pointer but the pointer itself cannot be changed because it is constant.



Discussion

No Comment Found