Why doesn't it change s 
int truncate(char *s, int n) {
    int l = strlen(s);
    if (l > n) {
        s[n] = '\0';
        return l - n;
    }
    else { 
        // then strlen(s) <= n
        return 0;
    }
}
