Пример #1
0
void i_process(char *str) {
    for (char *cptr = str;*cptr != '\0';cptr++) {
        if (*cptr >= 'a' && *cptr <= 'z') {
            *cptr += TO_UPPER_DIST;
        }
    }

    o_process(str);
}
Пример #2
0
void i_process(const char *arg) {
    char *str = strdup(arg);
    int last_idx = strlen(str)-1;
    for (int i = 0;i<last_idx/2;i++) {
        char tmp = str[i];
        str[i] = str[last_idx-i];
        str[last_idx-i] = tmp;
    }

    o_process(str);
    free(str);
}