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
Can you tell me how to check whether a linked list is circular?
How to establish connection with oracle database software from c language?
Difference between Shallow copy and Deep copy?
How are variables declared in c?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
Dont ansi function prototypes render lint obsolete?
What is character set?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How will you delete a node in DLL?
Can a pointer point to null?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What is a ternary operator in c?
What is getch?
Explain high-order bytes.
What are register variables in c?