Your statement
toupper (input[i]);
doesn't give you "strange outputs", you're ignoring the output. Here are some comments.
1. Many C functions return a value. In order to use that value, you need to assign it to a variable or use the function directly in a statement that's looking for a value.
For example, strlen returns an integer, the length of the string passed to it. Here are two ways to use that integer.
int myStringLen, i;
char myString;
strcpy (myString, "Hello World!");
/* save the length of myString to a variable */
myStringLen = strlen(myString);
/* or use strlen directly */
for (i=0; i
2. C functions do not change the value of parameters passed by value. For example, toupper(myChar); doesn't change the value of myChar. See next item.
3. toupper and tolower functions take an input character and return an output character. They do not change the input character. You're ignoring the output character because you don't do anything with the return value. You need to declare an output string and build it byte by byte in the loop.
outputString[i] = toupper(inputString[i]);
4. Take strlen out of your loop. You only need to check the length of the string once: it doesn't change. The way you're using strlen doesn't take the length of the entire string, it only takes the length from where you are (character i) to the end of string.
In C arrays, the first element is 0, not 1. input[1] is the second character, not the first. input[0] is the first.
The way you're using strlen, you never use the length of the string. strlen returns a value. Using it stand alone (without assigning it to a variable or using it as a parameter for a function) does nothing.
Use strlen(input) to end your loop: for (i=0; iYou have reserved 100 bytes for your string, but the string may not be 100 bytes long. There's no need to process 100 bytes if your string is "ABC".
5. For functions that need a pointer to a string, using the variable name directly is the same as getting the address to the first character in the string.
For example:
int i = 0;
GetCtrlVal (panelHandle, PANEL_INPUT, &input[i]);
is the same as
GetCtrlVal (panelHandle, PANEL_INPUT, input);
6. Take SetCtrlVal out of your loop. You only want to update the output after you converted the entire input string.
Do you have a C reference book for your class? I'd start in chapter 1.