原型:extern char *strupr(char *s);
用法:#include <string.h>
功能:将字符串s转换为大写形式
说明:只转换s中出现的小写字母,不改变其它字符。返回指向s的指针。
类似的
char *strlwr(char *s);
#include <stdlib.h>
#include <string.h>
#include <iostream>
using namespace std;
int main(void)
{
char str[] = "ABcd";
char *str2;
cout<<str<<endl;
str2 = strupr(str);
cout<<str<<endl;
str2 = strlwr(str);
cout<<str<<endl;
return 0;
}