0

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

1
  • 2
    int const* and const int* are exactly the same. Commented Oct 9, 2010 at 19:50

1 Answer 1

6

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.

Sign up to request clarification or add additional context in comments.

3 Comments

+1 but I would phrase that a little bit differently: "pointer to a memory region with constant integers"
"A similar construct is int * const. Here the pointer is constant but the value it points to is not." what is the exact application/meaning of this usage?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.