You have variables being declared into places where they don't fit.
Ints are for integers such as 1,2,3,4,5 ect.
Char is meant for single characters 'a' 'A'
so all you have here is variables that are undeclared being stored in.. well the wrong places. At-least that's how I interpret it, I could be wrong.
Look up a table of ASCII codes for characters. Combine that with the results of looking up what toupper does and the answer should become clear. If not then maybe run the program with a few values of item, both upper and lower case and see what the (return) value of index is.
Hello, I am trying to figure out what this function does also? From what I can gather, It seems that the int place w/ char item for letters is actually a number from ASCII table. Then this char letter is uppercase for different number in terms of the ASCII table for storage in char temp. Lastly, the new number/letter for char temp is subtracted by 65 for storage in int index. Finally, the index is final number that is returned in supposed array? I tried, but do not understand what is going on within the function. Thanks for any knowledge shared upon this...
1 2 3 4 5 6
int place(char item)
{
char temp = toupper(item);
int index = (int)temp - 65;
return index;
}