char str[]="qwerty";
char *p="qwerty";
str++; \\error
*str='a'; \\works
p++; \\works
*p='k'; \\error
whereas,
char str[]="hello";
char *p="hello";
str="tell";\\ error
p="tell"; \\works
strings point to themselves like arrays
then why is
str="tell"; \\error
an error??
is the case same for arrays??
please explain the reason for every line.
also, why can't we assign a string to another but we can assign a char pointer to another???