Winter operations essay questions of 1

This work belongs courses 2020 Object-Oriented Programming
Where the job requires 1 winter operations
Text of the job Questions and Answers
Other references What defect C language , the compilation process of the C language

Questions and Answers

What 1.C language defects

  • Thought process: for c ++ I do not do not understand, so I recall this semester to learn from some of the C language to present new to the experience, as well as some of the problems usually do programming problems encountered in the process, and look for some information, do the following summary.
  • Summary:
    The syntax of the language restrictions 1.C less stringent constraints on the type of the variable is not strict, the security implications of the program, the array index bounds without inspection.
    2.C program is sometimes difficult to understand. C language syntax is relatively simple ingredients, is a small language. However, the multiple data types, operators rich and diverse binding, so that there are some difficulties for its understanding. When the invention is the C language, in order to reduce a character input, comparison sake C language, C language can also write a program that ordinary people hardly understood.
    3.C language disadvantage mainly on the package data, which is a great defect such that the C data security.

2.C language compilation process

1. preprocessor. C read source of (# instructions beginning) wherein directive processing and special symbols. Precompiled program is basically done is the source of "alternative" work. After such alternatives, without generating a macro definition, there is no conditional compilation directives, no special symbols output file. The meaning of this document has not been pretreated with the source files are the same, but the content is different. Next, the output file will be translated as the output of the compiler into machine instructions.
2. Compile stage. After the resulting output file precompiled, the only constant. Pre-compiler have to do it is to have to work through lexical analysis and parsing, after confirming that all instructions are in line with the rules of grammar, which is translated into an equivalent representation of intermediate code or assembly code.
3. optimization phase. Part of the optimization intermediate code optimization. This optimization does not depend on a particular computer. Another optimization is aimed at generating the object code carried out.
4. The assembly process. Actually refers to the compilation process to translate assembly language code into machine instructions of target process.
5. Links program. The main job of the linker is relevant target file connected to each other, the symbol will soon referenced in a document connected with the symbol defined in another file, so that all these objects become one that allows the operating system installed into a unified whole execution.

Guess you like

Origin www.cnblogs.com/TJThunder/p/12234479.html
Recommended