Hi all.I could not understand why the following program didn't work.Please explain.
int main()
{
char *t="hello",*r;
r=t;
*r='H';
printf("%s",t);
return 0;
}
It results in segmentation fault.Bye.
Regards,
Jerico
int main()
{
char *t="hello",*r;
r=t;
*r='H';
printf("%s",t);
return 0;
}
It results in segmentation fault.Bye.
Regards,
Jerico
Comment