What is const int *const ptr?

Showing Answers 1 - 6 of 6 Answers


  • Jan 25th, 2012

Constant pointer to a Constant integer


  • Feb 5th, 2012

--> a ptr that points to a const var.
--> the var cannot be changed using the ptr
--> the pointer cannot point to anyother var.


  • Feb 5th, 2012

pointer to integer constant

  Was this answer useful?  Yes

Ramakrishna N

  • Jul 4th, 2012

const pointer which points to const data. I mean pointer and data both can not be changed.

Jagadeesh Arikuti

  • Jul 5th, 2012

Both are Constant
const int i=10;
const int * const ptr=&i;

You are not allowed to change int i are pointer ptr

  Was this answer useful?  Yes


  • Feb 8th, 2014

ptr is a constant pointer to constant integer. Both the values cant be changed.
const int a=10;
const int *const ptr=&a;
int b=20;
const int *const ptr=&b;//error

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions