hello, I have a character array with a string in it and it has an uppercase letter, I'm trying to convert it to all lowercase letters, I heard that the function tolower can be used, i put the ctype.h header in but i can't get it to turn my capital letter to a lower case letter
could anyone tell me what am I doing wrong, here is my code, it's pretty simple
thank you
Code:#include <stdio.h> #include <stdlib.h> #include <string.h> main() { char word[] = "Hello"; int n = 0; printf(" %s \n ", word); while ( n <= 3 ){ tolower( word[n]); n++; } printf(" %s \n ", word); getchar();}