Hello all!
I'm interested in creating a function that will take in an array and, using pointers, change that array to all lowercase. The process will be replicated in 2 other functions to change all of the array to uppercase letters or just the first letter of each word capitalized.
What I have is as follows:
Code:
int strtolower(char theString[]){
int theLength = strlen(theString);
for (i=0;i<theLength;i++)
theString[i] = toupper(theString[i]);
return 1;
}
However, my program stops unexpectedly when calling the function using:
Code:
char someArray[50][50][50];
strtolower(someArray[0][0]);
Any suggestions as to why my program is not performing as expected? Thanks for any help you can give!