what does the if (saw_null) condition mean
int terminate_string(char *c, int index) {
    int saw_null = 0;

    for (int i = 0; i < index; i++) {
        if (saw_null) {
            c[i] = '\0';
        }
    }
}