A C string is an array of char that ends with the character '\0', a zero byte. There is no stored length: functions walk the characters until they reach the zero. The literal "BUY" takes four bytes, B, U, Y and \0.
To loop over a string, keep going while s[i] != '\0'. Forgetting the terminator, or overwriting it, makes code run past the end. Characters are small numbers, so 'a' <= c && c <= 'z' tests for a lowercase letter, and c - 'a' + 'A' turns it into uppercase. The functions in <ctype.h>, such as isupper and toupper, do the same work.
A function that changes a string takes char *; one that only reads it takes const char *.
The loop stops at the terminating zero, not at a stored length.