#include<stdio.h>
#include<conio.h>
void strlwr(char[]);
void main()
{
char a[80];
clrscr();
printf("Enter any string\n");
gets(a);
printf("String in lower case\n");
strlwr(a);
getch();
}
void strlwr(char a[])
{
int i;
for(i=0;a[i];i++)
if(a[i]>='A'&&a[i]<='Z')
a[i]=a[i]+32;
else
a[i]=a[i];
printf("%s",a);
}
#include<conio.h>
void strlwr(char[]);
void main()
{
char a[80];
clrscr();
printf("Enter any string\n");
gets(a);
printf("String in lower case\n");
strlwr(a);
getch();
}
void strlwr(char a[])
{
int i;
for(i=0;a[i];i++)
if(a[i]>='A'&&a[i]<='Z')
a[i]=a[i]+32;
else
a[i]=a[i];
printf("%s",a);
}
This comment has been removed by the author.
ReplyDelete