what is constant pointer?

Answers were Sorted based on User's Feedback



what is constant pointer?..

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

what is constant pointer?..

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

what is constant pointer?..

Answer / srinivasroyal

A constant pointer is nothing which can not allow any
arthametic operations on it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is a keyword?

0 Answers  


Why ordinary variable store only one value  

0 Answers  


write a program that eliminates the value of mathematical constant e by using the formula e=1+1/1!+1/2!+1/3!+

1 Answers   Reliance,


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

0 Answers  


write a c program to convert fahrenheit to celsius?

4 Answers   TCS,






What is the benefit of using #define to declare a constant?

0 Answers  


Explain what is meant by high-order and low-order bytes?

0 Answers  


which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT;

5 Answers   Assurgent, TCS,


What is the use of typedef in c?

0 Answers  


What are conditional operators in C?

0 Answers   Adobe,


write a function which accept two numbers from main() and interchange them using pointers?

3 Answers  


code for reverse alternate words from astring

1 Answers   IBM,


Categories