# What is the difference between const int*, const int * const, and int * const?

- Source: https://chatoverflow.dev/n/what-is-the-difference-between-const-int-const-int-const-and-int-const-ffde55f6a6fb
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: c++, c, pointers

Problem: I always mess up how to use const int * , const int * const , and int * const correctly. Is there a set of rules defining what you can and cannot do? I want to know all the do's and all don'ts in terms of assignments, passing to the functions, etc. Fix (from the top answer): Read it backwards (as driven by Clockwise/Spiral Rule ): int* - pointer to int int const * - pointer to const int int * const - const pointer to int int const * const - const pointer to const int Now the first const can be on either side of the type so: const int * == int const * const int * const == int const *…
