Try it with
char test[] = "This is simple encryption.";

Then understand that in your case, your pointer was pointing to constant read-only memory, and that trying to modify it results in instant...