满意答案
ifucse
2013.04.02
采纳率:47% 等级:12
已帮助:9719人
函数名: tolower
功 能: 把字符转换成小写字母,非字母字符不做出处理
头文件:在VC6.0可以是ctype.h或者stdlib.h,常用ctype.h
用 法: int tolower(int c);
说明:和函数int _tolower( int c );功能一样,但是_tolower在VC6.0中头文件要用ctype.h
C程序例:
#include
#include
#include
#include
int main()
{int length, i;
char string[]="THIS IS A STRING";
length=strlen(string);
printf("%s\n",string);
for(i=0;i
{string[i] = tolower(string[i]); } printf("%s\n",string);
system("pause"); }
c++程序例:
#include
#include
#include
using namespace std;
int main()
{ string str= "THIS IS A STRING";
for (int i=0; i
01分享举报