So in attempting to learn how to use C-Strings in C++, I\'m running into issues with memory allocation.
The idea here is that a new string is created of the format
sizeof(s1) returns the size of a pointer variable, not the length of the array which it points to. Since you know that s1 points to a C-string, you should use the strlen() function instead.
sizeof(s1)
s1
strlen()