In C, If I have a string assigned to a variable, and I want to change only the last 4 letters in that string for something else, how should I do it? strcat()
? Something like:
int size;
char a[10] = "something";
size = strlen(a) - 4;
strcat(a + size, "1234");
Would that work? to get somet1234
? or would it just be something1234
?