1. Power
# Include <math. h>//Header filePow (A, B );//A ^ B
2. bool
# Include <stdbool. h>//Header files need to be added when bool type is used in C.
3. String operations
# Include <String. H>//Header file CharA [20], B [20]; Strcpy (A, B );//Copy string B toLength= Strlen ();//LengthStrcmp (A, B );//String comparison: Compares the characters in a and B one by one, and continues to compare the next character. The operation is terminated at the same time and the difference size is returned.
4. Fast sorting in C library functions
# include
///
header file
int num [
100
];
int CMP (
const
void * a,
const
void * B)
///
comparison functions
{
return * (
int *) A-* (
int *
) B;} qsort (Num,
100 ,
sizeof (Num [
0 ]), CMP);
//
call the sorting function
5. Input and Output
Enter a string with spaces
CharCh [100]; Gets (CH );
Output Format
IntA =12; Printf ("% 05d", );//Right alignment. The width is 5, which is not enough to be filled with 0. The output is 00012.Printf ("%-07d", );//Left alignment, 7 in width, not 0 fill, output: 1200000