Passed the technical test thing I took last week for a job, so I'm in for an interview. I'm quite surprised, as although the test was very easy, I spent too long on the C++ section crafting the perfect answers and stupidly ran out of time and didn't write anything for some other chunks of it (and wrote complete rubbish for the database bit as I rushed to scribble something down.) Nevermind, I'm the only person to get through to the interview. Which is nice.

You're modifying a string literal. String literals in C have type (non-const) char*, but are non-modifiable, doing so invokes the dreaded undefined behaviour, so a coredump isn't too bad, you should think yourself lucky you didn't rupture a hole in the fabric of the universe. In C++ string literals are const, but as Stroustrup The Wise explains:

The type of a string literal is "array of the appropriate number of const characters," so "Bohr" is of type const char[5]. A
string literal can be assigned to a char*. This is allowed because in previous definitions of C and C++, the type of a string literal was char*.
Allowing this assignment of a string literal to a char* ensures that millions of lines of C and C++ remain valid. It is, however, an error to try to modify a string literal through such a pointer: