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 are the types of type qualifiers in c?

861


What is register variable in c language?

860


Explain the difference between malloc() and calloc() function?

822


Write the control statements in C language

896


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

958


What is the difference between if else and switchstatement

1602


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

844


How to get string length of given string in c?

829


How can you tell whether two strings are the same?

1054


Explain About fork()?

870


What does do in c?

812


What will be the outcome of the following conditional statement if the value of variable s is 10?

1072


What are c header files?

798


What is the code in while loop that returns the output of given code?

1675


What are the scope of static variables?

857