Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

check if character is uppercase c++

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

using namespace std;

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

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

    cout << str;
    return 0;
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #check #character #uppercase
ADD COMMENT
Topic
Name
7+2 =