2. Basic programming knowledge
1) Relationship between CPU, memory, hard drive, graphics card, motherboard, and display
2) how to run the Hello World Program
Compile and unzip the chain to generate the. exefile. Execute the. exe file operating system)
3) What is the data type?
Basic type data
Integer: integer -- int-4 byte short integer -- short int-2 long integer -- longint-8
Floating Point: single precision -- float-4; double-8
Character: Single Character -- char-1
Composite data
Struct
Enumeration
Shared body
4) What is a variable?
Variable is equivalent to a container) the essence is a storage space in the memory.
5) Relationship between CPU, memory stick, VC ++ 6.0, and operating system
6) Why must variables be initialized?
Error & No initialization makes no sense
7) How to define variables?
Data type variable name = value to be assigned
8) What is hexadecimal?
B: Binary O: octal D: decimal H: hexadecimal
Printf (% d Indicates output in decimal format; % o indicates output in octal format % x or X indicates output in hexadecimal format)
Decimal binary division of two
9) How is a constant expressed in C?
Integer
Decimal: Traditional Writing Method
Hexadecimal: Add 0x or 0X to the front.
: Add 0 to the front
Floating Point Number
Float x = 3.2; // traditional
Scientific notation
Float x = 3.2e3; // The value of x is 3200
Float x = 123.45e-2; // The value of x is 1.2345.
Character
Enclose a single character in single quotes
String enclosed in double quotation marks
10) what binary code is a constant stored in a computer?
Integers are converted to binary data in the form of complement codes stored in computers.
The real number is converted to the binary data stored in the computer according to the IEEE754 standard.
The character is actually stored in the same way as an integer.
This article is from the "free as Freedom" blog, please be sure to keep this source http://ziyourufeng.blog.51cto.com/7940117/1304652