There are three type of string pointer.
const char * - This is a mutable pointer which points to a constant string.
Example:
const char * str = "Hello World"; str++;//OK str[0] = ' ';//Not compilable
char * const - This is a const pointer pointing to a writable string.
Example:
char * const str = "Hello World"; str++;//Not Compilable str[0] = ' ';//OK
const char * const - This is a const pointer pointing to a read-only string.
Example:
const char * const str = "Hello World"; str++;//Not Compilable str[0] = ' ';//Not Compilable
About our authors: Team EQA
You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.
Most popular
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average
Questions index C Questions C++ Questions Win32 MFC COM/DCOM DLL Questions
Compilers & Editors
Download Visual Studio Download XCode Download Visual Studio Code Android studio install sdk Eclipse installer Best C compilers IDEs
Development system setup
Windows media creation tool MSDN subscription Ubuntu virtualbox
New updated posts
Why learn C? Calculate weighted average