Code Library
Home Submit Free Hosting Link To Us Contacts

CPP Lower Case

CPP Lower Case CPP CPP Lower Case Download (.zip)



#include <iostream>
#include <cctype>

using namespace std;

void do_lowcase(char *);

int main() {
        char text[50];

        cout << "Enter a string: ";
        cin >> text;

        do_lowcase(text);

        cout << text << endl;

        return 0;
}

void do_lowcase(char *lc) {
        for(;*lc;lc++)
                *lc = (unsigned char)tolower((unsigned char)*lc);
}




  • CPPLower Case Upper Case


CPP Lower Case