c语言字符集的有效集特殊字符(中英对照)

c语言 字符集 特殊字符

Every language has the set of the characters which are used to form a sentence to write a program/code, we cannot use any character except the valid set of the characters defined by the programming language.

每种语言都有一组用于构成编写程序/代码的句子的字符,除了编程语言定义的有效字符集外,我们不能使用任何字符。

C字符集 (C character set)

Similarly, C programming language also has a set of characters, which are used to form a C language statement.

同样,C编程语言也具有一组字符 ,这些字符用于形成C语言语句。

C programming language character set contains the following characters i.e. following are the valid character set in C programming language,

C编程语言字符集包含以下字符,即以下是C编程语言中的有效字符集 ,

Alphabets

字母

Digits

位数

Special Characters

特殊的角色

1) Alphabets

1)字母

C programming supports all the uppercase and lowercase alphabets.

C编程支持所有大写和小写字母。

Uppercase alphabets: 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, ZLowercase alphabets: 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

So, there are total of 52 alphabets (all uppercase and lowercase) are allowed in C programming language.

因此,在C编程语言中,总共允许使用52个字母(全部大写和小写)。

2) Digits

2)数字

C programming supports all digits from 0 to 9, which are used to represent/construct a numeric value/expression or digits can also be used to define an identifier.

C编程支持从0到9的所有数字,这些数字用于表示/构造数字值/表达式,或者数字也可用于定义标识符。

Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

So, there are total 10 digits (all digits) are allowed in C programming language.

因此,C编程语言中总共允许10个数字(所有数字)。

3) Special characters

3)特殊字符

There are some of the special characters, which are used for special purposes (like mathematical, logical operations, etc), or to define an identifier in a batter way (like underscore to construct a long variable name, etc).

有一些特殊字符,用于特殊目的(例如数学,逻辑运算等),或以连击方式定义标识符(例如下划线以构造长变量名等)。

In C programming language, there are following special characters:

在C编程语言中,有以下特殊字符:

~ ` ! @ # $ % ^ & * ( ) _ - + = | \ { } [ ] : ; “ ‘ , . ? /

C语言字符集表 (C language characters set table)

Here is the table contains all C language character set,

这是包含所有C语言字符集的表,

Table format:

表格格式:

Alphabets

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

Digits

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Special characters

~ ` ! @ # $ % ^ & * ( ) _ - + = | \ { } [ ] : ; “ ‘ , . ? /

字母

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, ž

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, ž

位数

0、1、2、3、4、5、6、7、8、9

特殊的角色

〜`! @#$%^&*()_-+ = | \ {} []:; “' ,。 ? /

Image format:

图片格式:

C language characters set table

翻译自:

c语言 字符集 特殊字符

相关阅读

添加新评论