Given string is a palindrome
VI. The strlwr( ) and strupr( ) functions
The strlwr( ) function
changes the characters of a string into lowercase and the
strupr( ) function
changes the characters of a string into uppercase.
Syntax
strlwr (str1);
strupr (str);
For example,
/*Program to convert any string into lowercase characters and uppercase chara
cters.
#include
#include
main( )
{
char name1[80], name2[80];
printf(“\nEnter your string:”);
gets (name1);
strcpy(name2, name1);
strlwr(name1);
strupr(name2);
printf(“Equivalent lowercase string is %s”, name1”);
printf(“Equivalent uppercase string is %s”, name2”);
}
Do'stlaringiz bilan baham: