I am trying to assign a character using pointer but it doesn't do.
Will somebody please explain why following program stops working ?
#include <string.h>
int main(void) {
  char *s = "modifying...";
  // char s2[] = {'m','o','d','i','f','y','i','n','g','.','.','.',NULL};
  // s = s2;
  puts(s);
  *s = 'M'; // Here the program stops working
  puts(s);
  return 0;
}
 
     
     
     
    