c语言学习法(C language learning method)
c语言学习法(C language learning method)
The whole must be clear:
1) the program structures are three kinds: sequence structure, loop structure (three loop structure), structure (if and switch)
2) to read program from main (entrance), and then from the above sequence read (met cycle cycle, met choice).
3) computer data in the computer is stored in binary form. The position of the data storage is his address.
4) bit is a means of 0 or 1. Byte refers to the bytes, one byte = eight bits.
5) must remember how binary into a decimal.
To test the concept of constant:
1, compile part of pretreatment is not the C language, is no longer running time. C programming language compiler called the source program, it is stored in a text file with ASCII value.
Main function 2, each C language program is one and only one.
3, the function can not be defined function.
4, the algorithm is to have output, he can not enter.
5, break can be used in the loop structure and the switch statement.
6, the lowest level of the comma operator.
The first chapter
1) examine the legitimate user identifier:
The legal requirement is composed of letters, numbers, underscores. There are other elements is wrong.
And the first one must be a letter or the underscore. The first number is wrong.
Key words should not be used as a symbol for the user. Main define scanf printf is not a keyword. Where If is the puzzle you can do for the user identifier. Because the first letter If in the capital, so it is not a keyword.
2) the legal form for real data:
2.333e-1 is legal, and the data is 2.333 * 10-1.
The test formula: before e e will e be an integer number. .
3) the legal form of character data::
'1'is a character for a byte, "1" is a string of two bytes (containing a terminator).
ASCII'0'value to 48, ASCII value of'a' is 97, ASCII value'A'is 65.
4) integer is two bytes, the character is a byte, double precision is 4 bytes:
The test usually said, in the 16 or 32 bit compiler system system. In this case, do not worry, do