char* a = "string"; /*"string" is a string literal, thus modifying
value isn't allowed, but then why */
char b[] = "string1"; /*"string1" is
also a string literal but why modification of this is allowed? */
a[1] = 's'; //this is not allowed b[1] = 'p'; //this is allowed
Why can char array be modified when it is clearly pointing to a string literal?