Possible Duplicates:
const int = int const ?
Const in C
hi,
I would like to know the exact meaning of "int const* " in C ,And also a small comparison between "const int*" and "int const*" in an embedded programming system.
__kanu
Possible Duplicates:
const int = int const ?
Const in C
hi,
I would like to know the exact meaning of "int const* " in C ,And also a small comparison between "const int*" and "int const*" in an embedded programming system.
__kanu
What is the exact meaning of “int const* ” in C?
It means a pointer to a constant integer. In other words, the pointer is not constant, but the value it points to is.
And also a small comparison between "const int*" and "int const*"
There is no difference.
A similar construct is int * const
. Here there is a difference. This time the pointer is constant but the value it points to is not.