is uppercase c++ code example
Example 1: convert whole string to uppercase c++
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s = "Viet Nam";
transform(s.begin(), s.end(), s.begin(), ::toupper); //uppercase
cout << s << endl;
return 0;
}
Example 2: check if character in string is uppercase c++
if (isupper(str[i])) {
// str[i] is uppercase
}