C Program to Convert String from UPPERCASE to lowercaseHere we will discuss about the conversion of UPPERCASE to Lowercase of any string value.
if(the string[i]<=65 and string[i]>97) then we add 32 in the string[i]+32.
For Example:
string-> "CPROGRAMMINGSIMPLY"
The Conversion in lowercase is "cprogrammingsimply".
ALGORITHM:-
step 1 : Start
step 2 : Take an character array
step 3 : Input from user in array
step 4 : Check is string [i] element greater then equal 65 and less then equal 90
step 5 : Set the string [i] = string[i]+32;
step 6 : Repeat the 4,5 step
step 7 : Stop the Execution
PROGRAM CODE:-
#include<stdio.h>
#include<stdio.h>
void main()
{
char str[20];
int i;
clrscr();
printf("Enter any string->");
scanf("%s",str);
for(i=0;i<=strlen(str);i++)
{
if(str[i]>=65&&str[i]<=90)
{
str[i]=str[i]+32;
}
}
printf("\nThe string in lower case is->%s",str);
getch();
}
OUTPUT:-
Enter an string : CPROGRAMMINGSIMPLY
The string in lower case is: cprogrammingsimply
C Program To Convert Any binary number into decimal value How to convert binary number into decimal number using c Conversion of binary number to decimal number
ConversionConversion EmoticonEmoticon