2020.1.10 Cprimer brush book Notes (1)

The brush again from scratch C

C There are a few standards, ANSIC ISOC are called C89 and C90
and then in 1994 ANSI / ISO revised the standard, called C99
but is not well supported by C99
C11 C99 standard where there are many new features in so

For the wording of the main function

C90 reluctantly support

main()

But after C99 can not write so

void main()

Some compilers can write, but not all standards are recognized

C99 added

//

This way comments

Previous C standard can only be defined in the variable block at the top, you can not define variables in other places, but now no more of this (but now visual c7.0 room seemed to still use this provision)

To the variable name, then, C99 and later allowed to use longer identifier Name - 63 characters , for an external identifier, allows only 31 characters (external identifier is ... I do not really understand, talk about it later) , the old compiler can only use 8 characters
then, if more than the specified number of characters, then the compiler will ignore characters exceeded. . .
That old compilers may put the same variable as wrfwrfwr and wrfwrfwrfwrf

C99 and later used to expand the character set
Here Insert Picture Description
like this ?? = equivalent #

Not much to do instructions, you can go to see the original book

64 (bit) = 8 bytes (byte) = 1 word length
byte is the storage size of a char

About float, a floating point number is larger than the range of integer multiple loss of accuracy, a symbol, a mouse, the index composition, since any interval has infinitely many real numbers, the computer may not contain all the floating-point values ​​within the interval, for example 7.0 the performance of only 6.99999

In the past, floating point slower than integer arithmetic, but many CPU contains floating-point processor, reducing the speed gap

Published 61 original articles · won praise 8 · views 2441

Guess you like

Origin blog.csdn.net/weixin_43982216/article/details/103921786