I have read the C language tutorials in the past two days. I need to record the difficulties.
Pointer array and pointer to array
Int * PI [3]; // pi is a pointer array pointing to the int type
Int A [] [3] = {1, 2, 3}, {1, 2}, {1, 2, 3}; // a two-dimensional array is an array, A [0] is an array of three int-type elements in one dimension.
INT (* pA) [3] = A; // PA is a pointer to an array of three int elements.
Const
Const char * P1; // the pointer itself is not a constant and can be P1 ++. However, the pointer cannot be modified, but * P1 = 'A' cannot.
Char * const P2; // the pointer itself is a constant. P2 ++ does not work, but you can modify the content pointed to. * P2 = 'B' can
Const char * const P3; // pointer constant pointing to a constant
Function pointer
INT (* FP) (const char *,...) = Fprintf; // call can be FP ("hello") or (* FP) ("hello ")
Extern void insert (void );
Extern void Update (void );
Extern void Delete (void );
Void (* farray []) (void) = {insert, update, delete}; // farray is a function pointer array that calls farray [0] ()
Alloc. h indicates memory management functions (such as allocation and release ).
Assert. h defines assert debugging macros.
BiOS. h describes the various functions that call the IBM-PC rom bios subroutine.
Conio. h indicates that each function of the I/O subprogram of the DOS console is called.
Ctype. h contains the name class information about character classification and conversion (such as isalpha and toascii ).
Dir. h contains the Directory and path structures, macro definitions, and functions.
Dos. h defines and describes some constants and functions called by msdos and 8086.
Erron. h defines the entrustment of the error code.
Fcntl. h defines the symbolic constant used to connect to the Open Library subroutine.
Float. h contains some parameters and functions related to floating point operations.
Graphics. h describes various functions related to graphic functions, constant definitions of graphic error codes, various color values of different drivers, and some special structures used by functions.
Io. h contains the structure and description of low-level I/O subprograms.
Limit. h contains environment parameters, compilation time limits, number ranges, and other information.
Math. h describes the mathematical operation functions, and defines the huge Val macro, which describes the special structures used by matherr and matherr subprograms.
Mem. h indicates some memory operation functions (most of them are also described in string. h ).
Process. h describes the various functions of process management, spawn... And exec... Function structure description.
Setjmp. h defines the JMP Buf types used by longjmp and setjmp functions.
Share. h defines the parameters of the file sharing function.
Signal. h defines the SIG [ZZ (Z] [zz)] ign and SIG [ZZ (Z] [zz)] DFL constants, indicating the rajse and signal functions.
Stdarg. h defines the macro of the read function parameter table. (Such as vprintf and vscscarf functions ).
Stddef. h defines some common data types and macros.
Stdio. h defines the standard and extended types and macros defined by kernighan and Ritchie in UNIX System V. Standard I/O predefined streams: stdin, stdout, and stderr are also defined to describe the I/O Stream subprograms.
Stdlib. h describes some common subprograms, such as conversion subprograms and search/sort subprograms.
String. h describes some string operations and memory operation functions.
Sys/STAT. h defines some symbolic constants used to open and create files.
Sys/types. h describes the ftime function and timeb structure.
Sys/time. h defines the time type time [ZZ (Z] [zz)] T.
Time. h defines the structure of the time conversion subprograms asctime, localtime, and gmtime, the types used by ctime, difftime, gmtime, localtime, and stime, and provides prototype of these functions. Value. h defines some important constants, including those dependent on machine hardware and which are described for compatibility with UNIX System V, including floating point and double precision value ranges.