char* a
declares a pointer to a
char
. You can re-assign
a
anytime:
char* a = "a string";
a = "another string";
char a[20]
declares a
fixed size array. You can't change the value of
a
, but you can chande the content of the array:
char a[20] = "a string";
a = "another string";
strcpy(a, "another string");