Why can I modify a string literal with this function?
int truncate(char *target, int amt){
    int size = 0;

    for(int i = 0; target[i] != '\0'; i++){
        size = size + 1;
    }

    target[amt] = '\0';


    return (size - amt);
}