int truncate(char *s, int n){
    char *s_copy = malloc(sizeof(char) * strlen(s) + 1);
    strcpy(s_copy, s);
    int l = (int)strlen(s);
    int res = 0;
    if(strlen(s) > n){
        s_copy[n] = '\0';
        s = s_copy;
        res = l - n;
    }
    return res;
}
how can I change the s outside of the function?