- 2
- 0
- 约 5页
- 2017-09-01 发布于河南
- 举报
常用c语言类型(Commonly used C language types)
常用c语言类型(Commonly used C language types)
Language data types can be divided into three categories: basic types, construction types, derived types
Integer, int character, char, real (floating point) float, double precision, double, null type, void
Struct struct public (Federated) body union enumerated enum user-defined type (using keyword typedef)
Array type pointer type
1. integer constants: in C language, there are three types of integer constants: decimal integer constants, octal integer constants, and sixteen integer constants.
Decimal integer constants can be represented by a series of consecutive decimal numbers;
Octal integer constants begin with number 0 (Note: not the letter O), followed by a string of legitimate octal digits;
Sixteen decimal integer constants start with 0x or 0X, followed by a string of legal sixteen digit numbers.
Integer constants also have short integers (short, int), basic integers (int), long integers (long, int) and unsigned (unsinged) points.
2. integer variables: integer variables can also be divided into basic type, short integer, long integer and unsigned type four.
Define them using int, short, int (or short), long, int (or long), unsigned, int (unsigned, short, unsigned, long), respectively.
The number of bytes of memory and value range of different computers occupied by several of the above integer data have different provisions on the microcomputer of IBM-PC as an example, the storage space and the range of values assigned to the various data above the table type name for the number of bytes of int 2 -32768 ~ +32767 range short int 2 -32768 to +32767 long int 4 -2147483648 - +2147483647 unsigned int 20 unsigned to 65535 short 20 to 65535 unsigned long from 40 to 4294697295
3. real type constants: real constants in C language have two representations: decimal form and exponential form.
When the real data is expressed in exponential form, the letter E can be replaced by lower case e, and the index part must be integer (if it is a
您可能关注的文档
- 奥运明星名校车上盘点(Olympic star school car inventory).doc
- 婴儿用什么护肤品好(What kind of skin care products does the baby have).doc
- 姚广孝(Yaoguangxiao).doc
- 婴儿如何培养婴儿良好的睡眠习惯(How do babies develop good sleep habits in infants).doc
- 娱乐性故事片的剧本是怎样的(What's the script for an entertaining feature film).doc
- 子女教育哲文十篇有些事不能重来(Children's education Zhewen ten some things can not come).doc
- 孕妇护肤知识 孕妇自制面膜(Pregnant woman skin care knowledge; pregnant woman mask).doc
- 字谜答题(Crossword puzzles).doc
- 孕妇洗面奶,使用洗面奶的误区,正确使用洗面奶(Facial cleanser for pregnant women, the use of facial cleanser misunderstanding, the correct use of facial cleanser).doc
- 孙红雷(Honglei Sun).doc
原创力文档

文档评论(0)