0

Help me understand with a code

difference between int const*p1 and const int *p1

9th Dec 2017, 10:43 AM
Shikha Gupta
Shikha Gupta - avatar
3 Answers
+ 1
const can be either side of the type. const int * p1 is a pointer to a constant integer int const * p1 is the same (whereas: int * const p2 is a constant pointer to an integer whose value can change)
9th Dec 2017, 1:28 PM
ifl
ifl - avatar
0
no difference
9th Dec 2017, 11:08 AM
Nikolay
Nikolay - avatar
0
thanks to both of you my doubt is clear now
9th Dec 2017, 1:54 PM
Shikha Gupta
Shikha Gupta - avatar