I know this is, but what about this?Code:#include <stdio.h>
int main(void)
{
char v[] = "blablabla";
v[0] = 'b';
return 0;
}
I think it is ok but I just want to make sure. Thank you.Code:#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char *v = malloc(strlen("blablabla") + 1);
if (v)
strcpy(v, "blablabla");
v[0] = 'b';
free(v);
return 0;
}