The difference is that it doesntpoints to memory that belongs to a string constant and therefore is not writable.
When you do it
char works[128] = "example1\0";
the compiler copies the contents of the string without writing to the writable array. \0not required, by the way.
If you do this,
char* doesnt = "example2\0";
the compiler leaves a pointer pointing to an area of non-writable memory. Again, it \0will be inserted by the compiler.
gcc, char * . -Wwrite-strings. , :
warning: initialization discards qualifiers from pointer target type
doesnt :
const char* doesnt = "example2\0";