原型:extern int tolower(int c); 用法:#include 功能:将字符c转换为小写英文字母 说明:如果c为大写英文字母,则返回对应的小写字母;否则返回原来的值。 举例: // tolower.c #include #include main() { char *s="Hello, World!"; int i; clrscr(); // clear screen printf("%s/n",s); for(i=0;i-------------
Example
/* tolower example */ #include #include int main () { int i=0; char str[]="Test String./n"; char c; while (str[i]) { c=str[i]; putchar (tolower(c)); i++; } return 0; }Output:
test string.