Does this code always compile and run without error
char *get_extension(char •str) {
    char ext[4];
    char *p;
    if ((p = strchr(str, '.')) != NULL) {
        strncpy(ext, p, 4);
        ext[3] = '\0';
        return ext;
    } else {
        return NULL;
    }
}
printf("%s\n", get_extension("run.c"));