what is constant pointer?
Answers were Sorted based on User's Feedback
Answer / rekha_sri
Constant pointer:
-----------------
If you have a value in your program and it should not
change, or if you have a pointer and you don't want it to be
pointed to a different value, you should make it a constant
with the const keyword.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / srsabariselvan
constant Pointer:
we can't modify the value of pointer.i.e.,value of
pointer is constant.
Declaration:
int i=2,j;
int const *p;
p=&i;
p=&j;
Pointer Constant:
in case of Pointer constant, we can't modify the address of
pointer.i.e,address stored in pointer is constant.
This must be intialized
Declaration:
int i=2;
int *const p=&i;
*p=4;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / srinivasroyal
A constant pointer is nothing which can not allow any
arthametic operations on it.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the __date__ and __time__ preprocessor commands?
What's wrong with "char *p = malloc(10);" ?
How can I determine whether a machines byte order is big-endian or little-endian?
What is a structural principle?
Write a program to know whether the input number is an armstrong number.
Program to find the value of e raised to power x using while loop
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
Explain setjmp()?
State the difference between realloc and free.
What is the difference between formatted&unformatted i/o functions?
how could explain about job profile