wats the diference btwen constant pointer and pointer to a
constant.pls give examples.
Answer Posted / rani
Constant pointer cannot be reassigned to different objects
once its initialized. It can be used to modify the object
that it points to.
Eg.
int *const constPtr;
*constPtr =0; //can be modified like this
Pointer to constant can be reassigned to point to another
object of same type.
int const *ptrConst;
ptrConst = 0;
| Is This Answer Correct ? | 37 Yes | 3 No |
Post New Answer View All Answers
What is array of structure in c?
When should a type cast not be used?
How can you draw circles in C?
What does int main () mean?
How can I convert a number to a string?
What is getch c?
What is a wrapper function in c?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is difference between structure and union in c programming?
Why n++ execute faster than n+1 ?
Describe the header file and its usage in c programming?
How will you find a duplicate number in a array without negating the nos ?
given post order,in order construct the corresponding binary tree
What is the use of bit field?
Write a code to determine the total number of stops an elevator would take to serve N number of people.