C++官方参考链接:https://cplusplus.com/reference/cctype/toupper/

字符转换功能
两个在字母大小写之间转换的函数: 

函数
toupper
int toupper ( int c );

将小写字母转换为大写字母
如果c是一个小写字母并且具有一个大写字母的等价物,则将c转换为其对应的大写字母。如果不可能进行这样的转换,则返回值未改变的c。 
注意什么被认为是字母可能取决于所使用的语言环境;在默认的“C”语言环境中,小写字母是:a b c d e f g h i j k l m n o p q r s t u v w x y z分别转换为:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z。
在其他语言环境中,如果一个小写字符有多个对应的大写字符,则此函数总是为相同的c值返回相同的字符。
在C++中,此函数 (toupper)的特定于语言环境的模板版本存在于头文件<locale>中。

形参
c
要检查的字符,转换为一个int值或EOF。

返回值
如果存在这样的值,则为等价于c的大写字符,否则为c(未更改的)。该值作为int值返回,可以隐式转换为char值。

用例
/* toupper example */
#include <stdio.h>
#include <ctype.h>
int main ()
{
  int i=0;
  char str[]="Test String.\n";
  char c;
  while (str[i])
  {
    c=str[i];
    putchar (toupper(c));
    i++;
  }
  return 0;
}
输出:

C++ Reference: Standard C++ Library reference: C Library: cctype: toupper相关推荐

  1. Conditional project or library reference in Visual Studio

    Conditional project or library reference in Visual Studio In case you were wondering why you haven't ...

  2. link library 、target library、symbol library、synthetic library对照分析-基础小知识(九)

    文章目录 1.1 概念介绍 1.2 疑问解析 参考文档 DC 应用过程中涉及link library .target library.symbol library.synthetic library, ...

  3. undefined reference to `__stack_chk_guard' .. undefined reference to `__stack_chk_fail'

    1. 编译出错 undefined reference to `__stack_chk_guard' undefined reference to `__stack_chk_fail' 解决方法-1: ...

  4. git fatal: cannot lock ref ‘HEAD‘:unable to resolve reference‘refs/heads/main‘:reference broken

    问题: push的时候,电脑强制关机再启动,vscode中所有文件都变成了绿色,暂存待提交状态 当我再次提交时,就出现错误:git fatal: cannot lock ref 'HEAD':unab ...

  5. undefined reference to 'floor'/undefined reference to

    undefined reference to 'floor'/undefined reference to `& undefined reference to 'pow'/undefined ...

  6. 问题排查--@cannot lock ref 'HEAD': unable to resolve reference 'refs/heads/master': reference broken解决方法

    @cannot lock ref 'HEAD': unable to resolve reference 'refs/heads/master': reference broken解决 作者用的是ID ...

  7. C++ Reference: Standard C++ Library reference: C Library: cmath: cbrt

    C++官网参考链接:https://cplusplus.com/reference/cmath/cbrt/ 函数  <cmath> <ctgmath> cbrt C99 dou ...

  8. C++ Reference: Standard C++ Library reference: C Library: cmath: erf

    C++官网参考链接:https://cplusplus.com/reference/cmath/erf/ 函数  <cmath> <ctgmath> erf C99 doubl ...

  9. C++ Reference: Standard C++ Library reference: C Library: cstdio: printf

    C++官网参考链接:https://cplusplus.com/reference/cstdio/printf/ 函数  <cstdio> printf int printf ( cons ...

最新文章

  1. Python3中参数*args和**kwargs介绍
  2. python集合类型的四种操作符_深入解析Python中的集合类型操作符
  3. 跨平台开发框架到底哪家强?5款主流框架横向对比!
  4. 女士细线毛衣起多少针_从起针到缝合,教你织毛衣的各种要点(详细教程)
  5. Java讲课笔记35:初探泛型
  6. Linux基础-5进程管理工具
  7. 30096大学计算机应用基础,300道计算机应用基础试题(附答案)
  8. 码出高效:Java开发手册 ——百度网盘下载链接
  9. oracle中rollup函数与mysql中with rollup区别
  10. 怎样安装linux中文字体,linux如何安装中文字体库
  11. 微机原理-8086CPU
  12. C++输出透明背景字体
  13. Microsoft Office SharePoint Designer 2007 宣布免费
  14. 电脑开机太慢?这5个方法瞬间提升你的电脑速度
  15. python 把数字日期转换成中文日期
  16. 在visio里面插入带圆圈的数字字符。
  17. 工控服务器什么作用,工控机和服务器有什么区别
  18. 什么是以太网,它在WiFi世界中的价值是什么?
  19. Gee引擎常用功能简介
  20. 高回复率的开发信都有这些共同点

热门文章

  1. python识别图片内容并获取两个地点间的距离
  2. CSDN博客自定义域名以及解析自己的域名到CSDN
  3. 东风吹十里,风华一笔得。
  4. ★【世龙最爱之作】☆【丑丫头变身美女校花,不恋情的人懊恼,可是有了爱情之后更烦恼】第七十九章★
  5. 计算机毕业设计JAVA辅导员职责信息管理系统mybatis+源码+调试部署+系统+数据库+lw
  6. 分享几个做外链的平台
  7. 【无标题】P4924 [1007]魔法少女小Scarlet
  8. 鼠标如何从常见虚拟机中切出?
  9. VR全景诚邀您走进2019中国北京世界园艺博览会(可在线体验)
  10. java的Swing组件模拟qq登录界面