0 0 votes 1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations. Programming in C + – asu 521 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote 1. const char *a : a is a character pointer which is pointing to a constant character. It means value at address a can not be changed. 2. char * const a : a is a character pointer which is pointing to a fixed address. It means a can not point to another address, but value at address a can be changed. 3. char const *a : same as 1. (Pointer to a char const.). No semantic difference. vijaycs answered May 15, 2016 vijaycs comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes 1. const char *a; - here 'a' is a pointer to a constant charecter 2. char* const a; - here 'a' is a constant pointer to a charecter 3. char const *a; - same as 1 srestha answered May 15, 2016 srestha comment Share Follow 0 reply Please log in or register to add a comment.