String literals are actually immutable arrays of characters that the compiler pre-allocates and initializes statically somewhere. In other words they are mostly equivalent to const char[]. But for some archaic historical reasons, which I can not recall, the C language permitted assigning string literals to non-const-qualified char pointers, like yours. Trying to modify something inside this string with such pointer will not result in syntax error, but is undefined behavior nonetheless. In fact, it may glitch badly on some systems, where the strings may be loaded in some kind of read-only memory. That's why the compiler does you a favor and warns you to use const char pointer instead.