C language knowledge

1. Pointer: the definition of a variable in the program, it will then be assigned an address during compilation to the variable memory, can be found by visiting the variables required for this address, the address of the variable to be a pointer to the variable. Pointer as an address in memory, in most cases, this address is the memory location in another variable. A pointer to the address of the variable becomes variable. [Pointer is a variable address in memory]


2.C language provides operators & addresses to identify the address of a variable, a pointer operator * indicates that the variable is a pointer variable. ** represents a pointer to a variable pointer variable.


3. In the low-level language in assembly language are directly accessed through the address of the memory unit, generally use variable names in high-level languages ​​to access the memory unit, but the C language provides a way to access the memory unit through the address as a high-level language.


4. The pointer may point to a variable function. A function is allocated at compile time an entry address, the entry address pointer to the function is called. Variable can be a pointer to a function, and this function is called by the pointer variable. Function returns a pointer value referred to as the pointer to the function.


The preprocessing function C is the language-specific functions. Preprocessor includes many useful features, such as macros, conditional compilation, pre-processing functions using easy to modify, read, transplantation and debugging, but also easy to implement modular programming.


6. The memory organization can be seen through, dynamically allocated memory used to store the stack space, and the stack is to store local data object, functions, and the link parameters of the function and the function being called. In the C program with functions malloc and free to allocate and release the dynamic memory from the heap.


7.GCC: is a programming language developed by the GNU compiler. Not only powerful, but also can be compiled as C, C ++, Object C, Java, Fortran, Pascal, Modula-3, and Ada and other languages, GCC is also cross-platform cross-compiler of choice, which not only supports Intel's x86 family, but also support for MIPS, ARM, PowerPC, SPARC processors, and so on. So to speak, even if not the world's most efficient GCC compiler, it must be the world's most comprehensive compiler, especially for compiler development in the embedded space.


8.Makefile: make command is the GNU compiler tool engineering, which is used to compile the source code for a large number of inter-related, it can be achieved using the project management of the project and improve development efficiency. Makefile rules is to specify the role of compiling and linking in the implementation of make command, including a link between the original source code file dependencies and so on. Makefile file as a shell script, like, in which the operating system commands can be executed.

 

9.java is fully object-oriented, c is process-oriented, c ++ inherits c, but also joined the object-oriented approach. Java is a C ++ evolved, retains much of C ++, the programming mode is similar to C ++. But Java syntax clearer, smaller and easier to learn. C and C ++ does not support string variable, use the "Null" in C and C ++ programs on behalf of termination terminator string.

 

Guess you like

Origin www.cnblogs.com/kerwincui/p/11616341.html