2018-2019-1 20165316 "Information Security system Design Fundamentals" the second week to summarize the learning contents of the teaching materials
- Small end, low address to low, high address to high; You can determine the size and end type of a machine by forcibly extracting a byte of storage from either the cast or union.
- A logical operation has only 0 or 12 results, while bit-level operations are bitwise-processing.
- Round to even rule: if the integer part is odd, then. 5, or 5 if it is an even number.
Problems in teaching materials learning and the solving process
- I read the text p40: The symbols for the logical right SHIFT and the arithmetic right shift in the table are the same, and you want to know what the difference is between the two in the program. I checked the data, and in Java, the logic shifted right to ">>>" and arithmetic right to ">>". In the C language, the shift operation is performed with a logical left shift and an arithmetic right shift, but for unsigned types, all shift operations are logical.
Code Hosting
(run result of statistics.sh script)
Last week's summary of the wrong quiz
- 23. The following C language attributes are associated with code portability (ABC)
A. Define
B. typedef
C. sizeof ()
D. Union
Parsing: #define可以定义宏使得变量可移植, typedef can make type portability, and sizeof () makes different types of lengths portable.
- 29. To compile the prog.c on a 64-bit machine to a program that can run on a 32 machine, the following is correct (C)
A.
A program that cannot compile a 32-bit machine on a 64-bit machine
B.
GCC prog.c
C.
Gcc-m32 prog.c
D.
Gcc-m64 prog.c
Parsing: Textbook P27 most 64-bit machines can also run 32-bit machine-compiled programs,
Its command is
Linux>gcc-m32 prog.c
Learning progress Bar
|
Code lines (new/cumulative) |
Blog volume (Add/accumulate) |
Learning time (new/cumulative) |
|
target |
5000 line |
30 |
400 hours |
|
first week |
156/200 |
2/2 |
20/20 |
|
second week |
324/500 |
2/2 |
18/38 |
|
2018-2019-1 20165316 "Fundamentals of Information Security system Design" second week study summary