Вы находитесь на странице: 1из 1

#include <stdio.

h>
#include <stdlib.h>
#include <string.h>
void lowercase(char *s);
int main(void) {
char *c;
c=(char*)malloc(50*sizeof(char));
printf("\nEnter the input string");
scanf("%s",c);
printf("\nThe output string is ");
lowercase(c);
return 0;
}
void lowercase(char *s)
{
if(*s !='\0')
{
if(*s>='A' && *s<='Z')
{
*s=*s+32;
printf("%c",*s);
return lowercase(s+1);
}
else
return lowercase(s+1);
}
printf("%c",*s);
}

Вам также может понравиться