what is constant pointer?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is volatile variable how do you declare it?

558


What is pragma c?

601


What are the types of pointers in c?

524


Explain how can I make sure that my program is the only one accessing a file?

614


Can we assign string to char pointer?

578






What is adt in c programming?

599


What are the properties of union in c?

577


Explain is it valid to address one element beyond the end of an array?

724


can any one tel me wt is the question pattern for NIC exam

1551


What is %s and %d in c?

584


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

800


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4533


What is a protocol in c?

552


i have a written test for microland please give me test pattern

2173


Why c is called a mid level programming language?

599