I'm making a program where you input a word or phrase, and my program will automatically capatilize some of the letters in it. For example, if your entered
Code:
I am testing this program.
, my program might generate
Code:
i Am TEstIng tHIS prOgRAm
. My problem is that I have one function getPhrase() where the phrase or word entered by the user is stored in an array, and autoCapper() which looks something like:
Code:
for (i = 0; i <= numOfLettersInChar; i++) {
   if (randNum == 1 || 2 || 3) {
      if (char[i] == 'a') char[i] = 'A';
      if (char[i] == 'b') char[i] = 'B';
      // and so on
   }
// ...
What I need to do is carry over the int for number of chars in the array, and what each of the chars are from the getPhrase() to the autoCapper(). I can do one or the other by having getPhrase() return a char or int value, but I guess what I really need it to do is return a char and an int.

Sorry if this is a bit confusing, I'm a pretty novice programmer, so I can't understand too many technical answers to my question, and I'm not quite sure how to explain some of the things I'm doing.