To convert uppercase characters to lowercase
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
char str[80], con[80] , ch;
int i = 0;
clrscr();
printf("Enter the text in uppercase : ");
gets(str);
printf("\nThe converted text is : \n\n");
while(str[i] != '\0')
{
if(str[i] != ' ')
printf("%c", str[i] + 32);
else
putchar(' ');
i++;
}
getch();
}
Output:
Enter the text in uppercase : Anna University
The converted text is :
anna university
-
UpdatedDec 31, 2019
-
Views5,439
You May Like
Program to maintain employee details using structures
Program to maintain student details using structures
Check whether the person is eligible to vote or not
Print the numbers that are divisible by a given no.
Program to generate magic square
To sort the given numbers in ascending & descending order