1: Floating-point (float) operation is slower than int and may have rounding errors
such as float storage 0.1, later use may become 0.099999999987
2: Macros are defined only in uppercase, which is the norm for most C program apes to follow!
The C language is case-sensitive and basically follows the specification of using only lowercase letters in identifiers
Such as: Symboltable,currentpage said, sometimes can also symboltable, currentpage
3:GCC has multiple command-line options to control how thoroughly the check is done
-wall causes the compiler to generate a warning message when it checks for possible errors. Used in conjunction with-O
-W In addition to the warning messages generated by-wall, additional warning messages are required for specific situations
-pedantic production of warning messages in accordance with the requirements of the C standard to avoid nonstandard features in the program
-ansi disables non-standard GCC features and enables some less commonly used standard features
-std=c89 or-STD=C99 indicates which version of the C compiler to use to check the program
4: According to the C standard, the compiler must replace each comment statement with an empty characters
such as: a/**/b=0;
Might turn out to be a b=0 error.
5:
#include <stdio.h>intMainvoid){ inti; floatx; I= +; X=839.21f; printf ("|%d|%5d|%-5d|%5.3d|\n", I,i,i,i); printf ("|%10.3f|%10.3e|%-10g|\n", x,x,x); return 0;//take note of the empty line's retention point}
Output these things, minus sign left aligned, plus right align
6: Escape character
\ nthe line break
\ t watchmaking
\b Backspace
\ r Enter
\ \ = backslash "\"
\ ' denotes single quotation marks
\ "denotes double quotation marks
\DDD characters represented by 1 to 3-bit octal
\XHH characters represented by 1 to 2 hexadecimal digits
printf ("\" hello!\ ""); output "hello!"
C Language Programming modern methods--------