what is the difference between char * const and const char
*?
Answer Posted / brindha
Char* const p -> Here pointer P is a const pointer, which
means that this pointer can point to only one memory
location. eg. char* const p = &arr;
p++ ; -> This is invalid
const char* p -> this indicates that the data pointed by
the pointer p is constant & the value in that address
cannot be modified. eg. const char* p = 'a';
*p = 'b'; -> This is invalid
| Is This Answer Correct ? | 30 Yes | 2 No |
Post New Answer View All Answers
Explain what is the advantage of a random access file?
What is #define size in c?
What is the value of c?
What does stand for?
Compare interpreters and compilers.
Explain data types & how many data types supported by c?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Where are the auto variables stored?
What are header files why are they important?
What is a shell structure examples?
Why use int main instead of void main?
Are pointers really faster than arrays?
Tell us the use of fflush() function in c language?
What are preprocessor directives in c?
why we wont use '&' sing in aceesing the string using scanf