Are the following assignments valid? Or will any of these create problems. Please suggest.
const char * c1;
const char * c2;
const char * c3;
char * c4;
These assignments are all perfectly valid as I and others have explained in your recent run of near identical questions.
A const char*
is a pointer to memory that cannot be modified using that pointer. Nothing here can circumvent that. The compiler would object if you assigned c4 = c1
since then that would circumvent the const.