Why it is a problem to overwrite value in character array in C.
#include <stdio.h>
#include<string.h>
int main()
{
char str[]="hello";
printf("%s\n",str);
str="girl";
printf("%s",str);
return 0;
}
This throws error. What is the issue in doing this. Can anybody explain.
The value 'girl' is not printing and shows error.