There are three type of string pointer.
const char * - This is a mutable pointer which points to a constant string.
const char * str = "Hello World";
str = ' ';//Not compilable
char * const - This is a const pointer pointing to a writable string.
char * const str = "Hello World";
str = ' ';//OK
const char * const - This is a const pointer pointing to a read-only string.
const char * const str = "Hello World";
str = ' ';//Not Compilable
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
adjacency Matrix, Circular buffer, char array and char pointers, const char *,char * const, const char * const, alpha numeric, palindrome, convert case, string to int,
C Programming Language (Prentice Hall Software)
Let Us C Paperback - 2006 by Yashavant Kanetkar
Understanding and Using C Pointers Core techniques for memory management
Data Structures Using C and C++ Paperback - 1998
Data Structures In C Paperback - August 11, 2008 by Noel Kalicharan