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 is the use of pointers in C?
0 Answers Impetus, Motorola, Tavant Technologies, Virtusa,
. Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is (A) 1 (B) 3 (C) -6 (D) none
Explain the binary height balanced tree?
What's wrong with "char *p = malloc(10);" ?
What is the best way to comment out a section of code that contains comments?
write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview
2 Answers Satyam, UNIS, Wipro,
In which language linux is written?
Hai what is the different types of versions and their differences
What is C language Terminator?
What is the equivalent code of the following statement in WHILE LOOP format?
Write a C program to print 1 2 3 ... 100 without using loops?
How many keywords are there in c?