Whats up...
This code works in converting the word to uppercase, but it often puts garbage characters at the end of the converted word (upper). Is this occurring because text is not the full length of the array and so upper still displays those chars? How would I fix this?Code:int a, b; char text[25]; char upper[25]; for (a = 0, b = strlen(text); a < b; a++) { if (isalpha(word[a])) upper[a] = toupper(text[a]); else upper[a] = text[a]; }
Thank you all