I am trying to convert a char element from an char *argv[] array to lowercase from uppercase without using a function. I want to add 32 to the ascii integer.
When I try
First, don't assume you are using an ascii character set (ie, 32 is the wrong additive value in some character sets). The problem you are having is that 'h' + 32 is not a lower case "h". 'h' is already lowercase, so you want to be adding 0. Check it; something like:
if( tolower >= 'A' && tolower <= 'Z' )
tolower += 'a' - 'A';