找回密码
 立即注册
表明Integertype变量 | C#编程 2022-09-23 87 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
习惯上,符号常量名用大写,变量用小写,以示区别;C言语规定,标识符只能由字母,数字和下划线三种字符构成,且第一个字符有必要为字母或下划线。(合法变量名和标识符:sum,Student_name,_above,lotus_1_2_3,等。不合法的标识符和变量名:M.D.Jinh,$123,#33,a》b.).注意:大写字母和小写字母被认为是两个不一样的字符。整形常量即整常量,c整常量可以用三种方式表明:十进制整数;八进制整数(以0最初的数表明八进制数);十六进制整数(以0x最初的数是十六进制数)。整型变量可分为:基本型,长整型,短整型和无符号型四种。基本型,以int表明。短整型,以shortint表明,或以short表明。长整型,以longint表明,或以long表明。无符号型(其中又可以分为三种:无符号整型,unsignedint表明;无符号短整型,unsignedshort表明;无符号长整型,unsignedlong表明)。无符号型变量只能寄存不带符号的整数(eg:123,897)且不能寄存负数。实数在c言语中又称浮点数,实数有两种表明方式:a,十进制方式(由数字和小数点构成『有必要有小数点』);b,指数方式,(eg:123e3,或123E3,字母之前有必要有数字,后面有必要为整数。)实型变量:c实型变量分为单精度(float型)和双精度(double)型两类。单精度实数提供7位有效数字,float型数据在内存中占4个字节(32位),双精度实数提供15~16位有效数字,double型数据占8个字节。实型常量不分float型和double型。
.....

(It is customary to use uppercase for symbolic constant names and lowercase for variables to distinguish them; C language stipulates that identifiers can only be composed of three characters: letters, numbers and underscores, and the first character must be a letter or an underscore. (Legal variable names and identifiers: sum, Student_name, _above, lotus_1_2_3, etc. Illegal identifiers and variable names: M.D.Jinh, $123, #33, a>b.). Note: Uppercase and lowercase letters are considered two different characters. Integer constants are integer constants, and c integer constants can be expressed in three ways: decimal integers; octal integers (the initial number with 0 indicates an octal number); hexadecimal integers (the initial number with 0x is a hexadecimal number) . Integer variables can be divided into four types: basic type, long integer type, short integer type and unsigned type. Basic type, indicated by int. Short integer, indicated by shortint, or indicated by short. Long integer, expressed as longint, or expressed as long. Unsigned type (which can be divided into three types: unsigned integer type, unsignedint indicates; unsigned short integer, unsignedshort indicates; unsigned long integer, unsignedlong indicates). Unsigned variables can only store unsigned integers (eg: 123,897) and cannot store negative numbers. Real numbers are also known as floating-point numbers in C language. There are two ways to indicate real numbers: a, decimal mode (consisting of numbers and decimal points "a decimal point is necessary"); b, exponential mode, (eg: 123e3, or 123E3, before the letter It is necessary to have numbers, followed by integers.) Real variables: c real variables are divided into two types: single precision (float type) and double precision (double). Single-precision real numbers provide 7 significant digits, float type data occupies 4 bytes (32 bits) in memory, double-precision real numbers provide 15-16 significant digits, and double type data occupies 8 bytes. Real type constants are not divided into float type and double type.
.....)

[下载]23135242431.rar




上一篇:VC++实现QQ聊天工具【源代码】
下一篇:《Visual C++面向对象与可视化程序设计(2版)》黄维通著(源代