During program execution, a memory block containing “this is a test” is allocated, and the address of the first character in this memory block is assigned to the myString variable. The next line contains a separate memory block containing "this is very ...", and the address of the first character in this memory block is now assigned to the variable myString, replacing the address that he used to save the new address in the line "very very long".
just to illustrate, say, the first block of memory looks like this:
[t] [h] [i] [s] [] [i] [s] [] [a] [] [t] [e] [s] [t] and just say that the address of this first character is' t 'in this sequence / array of characters is 0x100. therefore, after the first assignment of the variable myString, the variable myString contains the address 0x100, which points to the first letter "this is a test."
then in a completely different memory block there is:
[t] [h] [i] [s] [] [i] [s] [] [a] [] [v] [e] [r] [r] [y] ... and just say that the address of this first character 't' is 0x200. therefore, after the second assignment to the myString variable, the myString NOW variable contains the address 0x200, which points to the first letter "this is very very ...".
Since myString is just a pointer to a character (hence: "char *" is a type), it only stores the address of the character; he does not care about how large the array is, he does not even know that it points to the "array", only that it stores the address of the character ...
for example, you can legally do this:
char myChar = 'C'; myString = &myChar;
Hope this was clear enough. If yes, answer / accept the answer. If not, please comment so I can clarify.