C language learning, 1 ~ 3 chapter summary

xiaoxiao2021-03-06  52

C language learning, 1 ~ 3 summary, provisive look at the front time! 1. Every C program must have a main function, the function body is enclosed by {} braces 2. "/ N" is Removers, the statement, the statement, the statement, the number 3. /*....../ indicate that the comment section 4. Scanf and Printf are all standard input and output functions provided by the C language. Scanf ("% D", & A) is the & meanings "Take Address",% D The meaning is that the input data is input by reformed in the decimal integer. The program is composed of the function, the function is the basic unit of the C program, so that the characteristics easy to implement the modularity of the program 6. A function Composed of two parts: The head of the function, the function body 7. A C program always executes from the main function, regardless of the location of the main function throughout the program, the C program format is free 8. Each statement and data definition The final must have a semicolon, the program written in a high-level language is called "Source Program" source 9.C language provides five basic data types: plastic homography single-precision real-dual precision real-in-kind type 10.c language 6 Aggregate Type: Architecture Pointer Structural Common Body Body Domain and Enumeration 11. The number of prime is meant, in addition to 1 and the number itself, the number 12 that cannot be removed by any other integer: Perspective of the algorithm: Paste Sex | Zero or more inputs | There are 1 or more outputs | validity 13. Three basic structures indicated by algorithm: sequential structure | Select Structure (Selection Structure) | Cyclic Structure (Repeat Structure), Features: Only One exit, only one entrance, each part of the structure has the opportunity to be executed, there is no dead loop 14. Structured program design method: self-top-gradual refinement - modular design - structured code 15. Define a symbol constant in the program, 0 -1 3 is an integer constant, 4.6 -1.23 is a real constant constant, 'd'' x 'is a character constant 16. The value of its value can be changed to a variable 17. The valid character sequence used to identify variable names, symbol constant names, function names, array names, type names, and file names are called identifier (Identifier), which is distinguished, and the variable name is not more than 8 characters. In C language, forced all used variables for mandatory definition, "First define, then use" 19. The shaped constant is a whole constant, can be expressed in three forms: decimal octal (starting with 0) hexadecimal (in 0x At the beginning) 20. Each plastic variable accounted for 2 bytes 21. The basic character type of integer variable is int, (1) Basic integer, expressed in INT (2) short integer, Short Int or Short represents (3) Long integer, indicated by long int or long, the value range of an int type variable is: -32768 ~ 3276722. Signature Basic integer [Signed] int Value range: -32768 ~ -32767 None symbol basic integer Unsigned [int] Value range: 0 ~ 65535 Has symbol Short [Signed] short [int] Value range: -32768 ~ 32767 No symbol short integer SCIENTIARUM NATURAL UNIVERSITY (NATURAL SCIENCES). SCIENCE AND TECHNOLOGY OF WEST CHINA. Real number is also known as floating-print number, representing a decimal decimal form and index form 24. A real variable accounts for 4 bytes (32 bits), divided into: single precision type (FLOAT) Bit number 32 effective number 6 ~ 7 double precision (double) bits 64 effective number 15 ~ 16 long double precision type (long double) bits 128 Effective numbers 18 ~ 1925.% F is the format 26 when outputting a real number. CHAR C1, C2; it represents C1 and C2 as a character variable, 1 character variable accounts for one byte in memory, "% C" is the format 27.ascll code table that must be used when outputting characters, uppercase alphabetical Small write letters 32, C language allows character data to calculate directly, 'A'

转载请注明原文地址:https://www.9cbs.com/read-72717.html

New Post(0)