This blog is under construction

Saturday, 17 March 2012

tolower example in C

Header file:

    int tolower (int input)

    converts the given input to upper case if possible

Return Value:
    returns lower case of "input", if "input" is in uppercase.  Otherwise, "input" is returned unchanged

tolower function C example:

  int main() {
        char c;
        printf("Enter your input:");
        c = getchar();
        printf("Result for the given input: %c\n", tolower(c));
        return 0;

  jp@jp-VirtualBox:~/cpgms$ ./a.out
  Enter your input:A
  Result for the given input: a

No comments:

Post a Comment