There are 2 types of strings. C-string (which is more like an array of chars) and string as a class (to use it you need to use header #include<string>).
1. Toupper function is it working with both types of strings? Or if you have regular string your compliler just turns it into array of chars behind the scences?
2. Why there are 2 types of toupper:
a. toupper (header #include <ctype>).
b. toupper (header #include <locale>).
Or I am wrong and toupper functions are the same just stored in 2 different libriries?
The function toupper() in <locale> comes from <ctype> and is there for convenience, or at least that's what the reference page on this website said. As for using toupper(), it takes a char as input, and that char can come from a c-string or std::string, the toupper() function won't know where it came from.