wats the diference btwen constant pointer and pointer to a
constant.pls give examples.
Answer Posted / jamili reddy
int i =12;
int * const ptr = 24; //constant pointer
you can't change the ptr value
const int *ptr = 24;//ptr to a constant
int const * ptr = 24;//ptr to a constant
you can't change the value at ptr
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the different types of data structures in c?
Which of these functions is safer to use : fgets(), gets()? Why?
What is uint8 in c?
What is calloc() function?
How can I do graphics in c?
Create a simple code fragment that will swap the values of two variables num1 and num2.
Which is better malloc or calloc?
Describe static function with its usage?
Why main is used in c?
Explain the term printf() and scanf() used in c language?
What is the general form of function in c?
What is the benefit of using const for declaring constants?
What is the benefit of using #define to declare a constant?
What is NULL pointer?
Tell me when is a void pointer used?