文件名称:the-use-of-variable-
介绍说明--下载内容均来自于网络,请自行研究使用
变量代表了一段可操作的内存,也可以认为变量是内存的符号化表示。当程序中需要使用内存时,可以定义某种类型的变量。此时编译器根据变量的数据类型分配一 定大小的内存空间。程序就可以通过变量名来访问对应的内存了。
如果说变量的数据类型决定了对应内存的大小,那么存储类型则影响着对应内存的使用方式。所谓使用方式,具体说就是在什么时间、程序的什么地方可以 使用变量,即变量的生命周期和作用域。
先了解一些基本常识。一、在程序运行时内存中有三个区域可以保存变量:静态存储区、栈(stack)和堆(heap)。二、根据变量定义的位置可 分为全局变量(定义在函数体外的变量)和局部变量(定义在函数体内的变量,包括形参)。
-Variable represents a period of operational memory, the memory can also be that the variable is a symbol of that. When a program needs to use memory, you can define a certain type of variable. At this point the compiler the data type of the variable distribution of a certain size of memory space. Program can be accessed through the variable name corresponding to the memory.
If the variable s data type determines the corresponding memory size, then the storage type is affecting the corresponding memory is used. The so-called use, specifically, at what time, where the program can use variables, namely life-cycle and variable scope.
First understand some basic common sense. First, the program runs in three areas of memory can be saved variables: static memory, stack (stack) and heap (heap). Second, the location of the variable definitions can be divided into global variables (variables defined in the function body) and local variables (variables defined in the function body, inclu
如果说变量的数据类型决定了对应内存的大小,那么存储类型则影响着对应内存的使用方式。所谓使用方式,具体说就是在什么时间、程序的什么地方可以 使用变量,即变量的生命周期和作用域。
先了解一些基本常识。一、在程序运行时内存中有三个区域可以保存变量:静态存储区、栈(stack)和堆(heap)。二、根据变量定义的位置可 分为全局变量(定义在函数体外的变量)和局部变量(定义在函数体内的变量,包括形参)。
-Variable represents a period of operational memory, the memory can also be that the variable is a symbol of that. When a program needs to use memory, you can define a certain type of variable. At this point the compiler the data type of the variable distribution of a certain size of memory space. Program can be accessed through the variable name corresponding to the memory.
If the variable s data type determines the corresponding memory size, then the storage type is affecting the corresponding memory is used. The so-called use, specifically, at what time, where the program can use variables, namely life-cycle and variable scope.
First understand some basic common sense. First, the program runs in three areas of memory can be saved variables: static memory, stack (stack) and heap (heap). Second, the location of the variable definitions can be divided into global variables (variables defined in the function body) and local variables (variables defined in the function body, inclu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
the use of variable .doc