I am trying to understand why an array variable cannot point anywhere else?
Sample code:
char s[] = "How big is it";
const char *t = s;
This is the code,I create a sample array s[]
and assign it a value "How big is it", now I create a character pointer array and assign it the value of s's address.
Now when I say something like this,the complier throws me an error:
s=t; ----> compiler error
Why is that? Is it because the string literal reference would get lost?