anxious7
Technical User
- Nov 23, 2007
- 7
why this is not working ?
Code:
char* ptr= "Hello";
*ptr='s';
printf("%s\n",ptr);
[\code]
and this does
[code]
char a[] = "Hello";
char* ptr= &a;
*ptr='s';
printf("%s\n",ptr);
[\code]