where is the change occurring if i am reassigning a character to *p .
#include<stdio.h>
int main()
{
char* p="hello" ;
printf("%s",p);
*p='a' ;
printf("%s",p);
return 0;
}
*p='a' should have replaced 'h' with 'a' in the string .
*p should access and base element of the string pointed by p and replace it .
but print statement prints "hello " both times
but it doesnt can anyone explain why not ??