Convert String to Uppercase
C++
Easy
5 views
Problem Description
Convert all lowercase letters to uppercase.
Real Life: Like CAPS LOCK on keyboard.
Step-by-Step Logic:
1. Check each character
2. If lowercase (a-z), convert to uppercase
3. Subtract 32 from ASCII value (or use toupper())
4. Print converted string
Official Solution
void string_q2_uppercase() {
string text = "hello world";
cout << "Original: " << text << endl;
for(int i = 0; text[i] != '