I'll admit the title may be confusing, but I really didn't know a better way to put this into words. Here's the code:
char * convertCase(char const * array){
size_t i = 0;
while(array[i] != '\0'){
if(array[i] > 96 && array[i] < 123) *array+i -= 32; // fourth row
else if(array[i] > 64 && array[i] < 91) array[i] += 32; // fifth row
i++;
}
return(array);
}
What I want to do is something like what you can see in the fifth row, just in the "fourth row" fashion. I'd like to traverse an array in a similar way, but that gives me an l-value error. What's the correct way?