计算机专业英文翻中文

来源:百度知道 编辑:UC知道 时间:2024/06/24 12:57:26
C uses the char data type to hold characters. You saw on Day 3, "Storing Data: Variables and Constants," that char is one of C's numeric integer data types. If char is a numeric type, how can it be used to hold characters?
The answer lies in how C stores characters. Your computer's memory stores all data in numeric form. There is no direct way to store characters. However, a numeric code exists for each character. This is called the ASCII code or the ASCII character set. (ASCII stands for American Standard Code for Information Interchange.) The code assigns values between 0 and 255 for upper- and lowercase letters, numeric digits, punctuation marks, and other symbols. The ASCII character set is listed in Appendix A.
For example, 97 is the ASCII code for the letter a. When you store the character a in a type char variable, you're really storing the value 97. Because the allowable numeric range for type char matches the standard ASCII character set, char i

我晕死,这么多还没有分,基本没有人会给你干的把分提到100就可以了.

ç使用的字符数据类型进行字符。你看到的第3天, “存储数据:变量和常量, ”这是一个字符的C的数字整数数据类型。如果字符是数字类型,它怎么能用来举行字符?
答案就在于如何ç商店字符。您的电脑记忆体商店中的所有数据数值的形式。不存在直接的方式来存储字符。然而,数字代码存在的每一个字符。这就是所谓的ASCII码或ASCII字符集。 ( ASCII的主张美国标准信息交换码) 。指定的代码值0和255之间的上层和小写字母,数字数字,标点符号和其他符号。该ASCII字符集是列在附录A
例如, 97的ASCII码的信字母a.当你存储的字符a的字符类型变量,你真的储存的价值97 。由于允许的范围内数字型字符相匹配的标准ASCII字符集,字符非常适合用于存储字符。
在这一点上,您可能有点纳闷。当C商店字符作为数字,请问您的程序知道是否某一类型字符变量是一个字符或号码是多少?正如您了解后,宣布一个变量类型字符是不够的;你必须做些别的事情的变数: