常用c语言类型(Commonly used C language types).docVIP

  • 2
  • 0
  • 约 5页
  • 2017-09-01 发布于河南
  • 举报

常用c语言类型(Commonly used C language types).doc

常用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

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档