Answers for "checking if character is lower in c++"

C++
0

checking if character is lower in c++

#include <cctype>
#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    char str[] = "This Program Converts ALL LowerCase Characters to UpperCase";

    for (int i=0; i < strlen(str); i++)
    {
        if (islower(str[i]))
            /*  Converting lowercase characters to uppercase  */
            str[i] = str[i] - 32;
    }

    cout << str;
    return 0;
}
Posted by: Guest on October-11-2021

Code answers related to "checking if character is lower in c++"

Browse Popular Code Answers by Language