Flip a string's lowercase characters to uppercase and vice versa | C Programming Example

Flip a string's lowercase characters to uppercase and vice versa | C Programming Example

Portfolio Courses

3 года назад

4,688 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@90s_arc
@90s_arc - 19.02.2023 06:04

What does s[i] means why that i char is using in it

Ответить
@DaiMoscv
@DaiMoscv - 11.10.2022 16:58

Alternative solution:

void letter_flip(char *str){
char *p;
for(p = str; *p != '\0'; p++) {
if(*p >= 65 && *p<= 90)
*p += 32;
else if(*p >= 97 && *p<= 122)
*p -= 32;
else
*p = *p;
}
}

thanks for the videos as always

Ответить