首页 > 其他分享 >c语言的关键字(c语言的关键字都是小写的吗)

c语言的关键字(c语言的关键字都是小写的吗)

时间:2022-10-24 13:02:01浏览次数:59  
标签:语句 语言 函数 关键字 循环 小写 声明 变量


C语言有多少个关键字

标准C++关键字如下:

"and ","and_eq ","asm ","auto ","bitand ","bitor ",

"bool ","break ","case ","catch ","char ","class ",

"compl ","const ","const_cast ","continue ","default ","delete ",

"do ","double ","dynamic_cast ","else ","enum ","explicit ",

"export ","extern ","false ","float ","for ","friend ",

"goto ","if ","inline ","int ","long ","mutable ",

"namespace ", "new ","not ","not_eq ","operator ","or ",

"or_eq ","private ","protected ","public ","register ","reinterpret_cast ",

"return ","short ","signed ","sizeof ","static ","static_cast ",

"struct ","switch ","template ","this ","throw ","true ",

"try ","typedef ","typeid ","typename ","union ","unsigned ",

"using ","virtual ","void ","volatile ","wchar_t ","while ",

"xor ","xor_eq ",

共有49个一共32个关键字。。。。

auto :声明自动变量 double :声明双精度变量或函数 int: 声明整型变量或函数 struct:声明结构体变量或函数 break:跳出当前循环 else :条件语句否定分支(与 if 连用) long :声明长整型变量或函数 switch :用于开关语句 case:开关语句分支 enum :声明枚举类型 register:声明寄存器变量 typedef:用以给数据类型取别名 char :声明字符型变量或函数 extern:声明变量是在其他文件正声明 return :子程序返回语句(可以带参数,也可不带参数) union:声明共用数据类型 const :声明只读变量 float:声明浮点型变量或函数 short :声明短整型变量或函数 unsigned:声明无符号类型变量或函数 continue:结束当前循环,开始下一轮循环 for:一种循环语句 signed:声明有符号类型变量或函数 void :声明函数无返回值或无参数,声明无类型指针 default:开关语句中的“其他”分支 goto:无条件跳转语句 sizeof:计算数据类型长度 volatile:说明变量在程序执行中可被隐含地改变 do :循环语句的循环体 while :循环语句的循环条件 static :声明静态变量 if:条件语句

C语言关键字有哪些?

break跳出掌握语句 casewhile掌握用 char字符型 const常量 continue跳过本循环并执行下一次循环掌握 defaultwhile地else状况类似 do相对while先执行后判别 double双精度 elseif语句内地..按字面解释 enum枚举 extern引用外部变量 float单精度 for循环 goto这个是语句掌握...没用过..应当是向case一样地..跳到标签执行 if判别 int整型 long长整型 register寄存器变量 return返回值 short短整型 signed有符号 static静态声明 sizof能得到内存占用 struct结构 switch=.=就是掌握,和case,default一同 typedef能够创建自己地类型 union怎么说不知道...和结构差不多..但是公用内存 unsigned无符号 void无返回值 while循环

C语言里有32个关键字:

基本数据类型:

void/int/char/float/double/signed/unsigned/short/long/

sizeof/typedef/enum

数据对象存储方式:

auto/static/extern/regiter/const/"不可变量"

流程控制:

if/else/do/while/goto/for/break/continue/switch/case/default/return/

定义复合数据类型:

struct/union/

标签:语句,语言,函数,关键字,循环,小写,声明,变量
From: https://blog.51cto.com/yetaotao/5789458

相关文章