The local variables of the program exist in (the stack), the global variables exist in the (static zone), and the dynamic requisition data exists in the (heap). 1. Acting on a variable:Declare a local variable with static-------local variable refers
Const, static, extern usage summary, constextern
Const application:
1. For the basic declaration const int r = 100; // standard const variable declaration and initialization, the compiler will directly replace it with 100 during compilation after
Scope rules tell us the valid range of a variable, where it was created and where it was destroyed (that is, out of scope). The valid scope of a variable starts at its defining point, to the first closing parenthesis of the nearest opening brace
Http://www.cnblogs.com/kunhu/p/3629636.htmlOriginally from: http://blog.sina.com.cn/s/blog_5f8817250100i3oz.htmlThis is not not a discussion of the university curriculum learned in the "compilation Principle", just write some of my own understanding
Original blog, reprint please indicate the source--Zhou Xuewei http://www.cnblogs.com/zxouxuewei/Static is used in two ways: static in process-oriented programming and static in object-oriented programming. The former applies to ordinary variables
Content from: C language face large summary of questionsP.S. Only pick up what you think might be asked and not.
What is static used for? (Please specify at least two types)
1. Scope of the restriction variable 2. Set the storage
C Language Nineth Round: scope and Storage type "Learning goals"1. Local Variables2. Global variables3. Storage type4. MemoryA: Local VariablesLocal variables are also known as internal variables. A local variable is a description defined within a
The static in C + +There are two uses for static in C/C + +: Static in process design and static in object-oriented programming. The former applies to ordinary variables and functions, and does not involve class problems.A. Static keywords for
1. What is the difference between a static global variable and a normal global variable? What is the difference between a static local variable and a normal local variable? What is the difference between a static function and a normal function?A:
Static as the name implies. In this I would like to systematically tell about the role of the static keyword, of course, mainly to tell it in the development of language C and C + + role, in other aspects of the role please find additional
ScopeScope rules tell us the valid range of a variable, where it was created and where it was destroyed (that is, out of scope). The valid scope of a variable starts at its defining point, to the first closing parenthesis of the nearest opening
VariableGlobal variables:1 . Variables placed outside of all functions int N; 2 after the program starts, the main function is created and destroyed after the main function is finished. In a multi-file structure program, the global variable should
Usually the academic must use Python many ah, but the school recruit the written examination not to open the Language Foundation, non-CS elementary School small weak cold to finish some C + + question preparation. Very weak very bitter force
1. The concept and function of C + + singleton modelThe singleton mode, also known as the single-piece mode, the list mode, is probably the most widely used design pattern. The intent is to ensure that a class has only one instance and provides a
In the learning of the microcontroller only really know what the C language is, it is to do ~ but the C language used to embed only its small part of the application, there are many places.We are not in the process of writing, many errors even if
In general, an executable binary program (more specifically, in a Linux operating system, a process unit, called a task in uc/osii, has 3 parts when it is stored (not transferred to memory), which is the code snippet (text), the data segment, and
First, the static in the process design orientedReprint: http://blog.csdn.net/celerylxq/article/details/61604991, static global variable before the global variable, plus the keyword static, the variable is defined as a static global variable. Let's
First, the definitionTextbook answer, a process is the smallest unit of resource allocation, and a thread is the smallest unit of CPU scheduling.The process has its own independent address space (virtual, 4G size), and one process crashes without
This article mainly introduces the C language static, extern and pointer functions, a friend in need can refer to the 1.exit (0) Normal exit program exit (1) Program exception exit program 2.static (static variable) modified local variable
C Language Executable code structure
Name
Content
Code Snippets
Executable code, string constants
Data segment
Global variable initialized, global static variable initialized, local static variable,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.