The way c handles strings is a bit confusing for beginners. Effectively a string is stored in an array of characters, so the string "hello" is stored as ['h','e','l','l','o',0] (note that single quotes: ' are used to tell the compiler that they are a single characters, and double quotes " are for strings, whch the compiler "converts" into characters for you). When you do x="hello", x is actually the pointer to the first element in the array in the memory. The 0 at the end of the array (it's not the character '0') is called a null byte and tells the program that the string stops there.
When you look at a function like Serial.print, it takes a char* that points to the first character, and then steps through the array processing each character until it reaches a 0 (null byte).
What this means is that if you are trying to join the two strings, "hello" and "there" you need to join the two arrays: ['h','e','l','l','o',0] and ['t','h','e','r','e',0]. There are functions in the library string.h which make it easy to do these kinds of things (look at strcat http://www.cplusplus.com/reference/cstring/) but these libraries can be quite "heavy" (take up alot of the available program memory) so for microcontrollers, some programmers write these kind of simple functions themselves, to save the space of including the whole library.
Note that the buffer has to be declared as long as your string, plus one more for the null terminator. That is, to do "Hello" you need buffer[6]; - 5 for the hello and 1 for the null at the end.
Don't know WHY you would want to do it in such a convoluted way, but it will work.