Make All String Letters Lowercase | C Programming Example

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thank you, sir, for the help! I tried many ways to get this result but they wouldn't work. Your way made sense and worked quite nicely!

ziadhamdi
Автор

Your function takes a character pointer as an argument, but you are actually passing in a character array, which allows you to then change the case of each of the individual characters in the array. How would this function need to be designed if you actually wanted to pass a character pointer and not a character array? So let's say I have the following:

char *phrase = "Portfolio Courses";

And I want to use the make_lower() function to make "phrase" as lower case. I want to pass the character pointer "phrase" into the make_lower function. As it stands if you tried to do this with a character pointer you would get a segmentation fault.

atrain
Автор

with a function my grandma can also do it. i was hier to see if there is a way to make it without function. thanks whatever.

yusufetturki