Write
a program in C to input a character from the user in upper case and print that
character into lower case.
In the previous blog we have discuss about the program
to print in upper case and now we are going to write a program to print character
in lower case with using to using to lower function. to lower function used to
convert a upper case character into the lowercase. The required header file is
ctype.h.
Syntax:
-
Character
variable name= tolower (character variable)
Program: -
#include <stdio.h>
#include<ctype.h>
void main ()
{
char ch;
clrscr ();
printf( “\n enter the upper case character= “);
scanf(“%c”, & ch);
ch= tolower (ch);
printf(“\n lower case character is = %c”, ch);
getch();
}
OUTPUT:
-
Enter the uppercase character
=
Lower case character is =
Comments
Post a Comment