Showing posts with label tolower(). Show all posts
Showing posts with label tolower(). Show all posts

Wednesday, May 26, 2021

, , , , ,

Example program for tolower() function in C

 Well as it's name says tolower() function in C programming is used to converts a uppercase alphabet to an lowercase alphabet.

Syntax for tolower() in C :-

int tolower(int ch);

Parameter:  tolower() in C use only one parameter "ch" which is a passed character to be converted to lowercase.

Return Value: this function return converted lowercase character.

Example program for tolower() function in C

 

// C program to demonstrate
// example of tolower() function.
  
#include <ctype.h>
#include <stdio.h>
  
int main()
{
  
    // Character to be converted to lowercase
    char ch = 'G';
  
    // convert ch to lowercase using toLower()
    printf("%c in lowercase is represented as = %c", ch, tolower(ch));
  
    return 0;
}

OUTPUT :- 

tolower() in C
 tolower() function in C