C语言转换大小写

来源:互联网 发布:中国出口数据查询 编辑:程序博客网 时间:2024/05/22 12:10
#include<ctype.h>#include<stdio.h>int main(){//结果为零则为假,非零为真printf("%d\n",isupper('a'));//判断是否传入的是大写字母printf("%d\n",islower('a'));//判断是否传入的是小写字母//直接写数字不加单引号实则传入的是ASCII码printf("%d\n",isalpha(97));//相当于鞋城printf("%d\n",isalpha('a'));printf("%c\n",toupper('a'));printf("%c\n",tolower('A'));return 0;}


 
原创粉丝点击