int (* sort_comparator)(const void *arg1, const void *arg2);
Representation a comparator function pointer using in sort methods, such like qsort function
void exit(int exitCode);
Exit program
void abs(int inValue);
Return the absolute value of the given number
void* malloc(size_t size);
allocate memory from heap space
void* calloc(int numOfArray, size_t arrayElemSize);
allocate memory from heap space, and set all to 0, use in array creation
void* realloc(void *oldBuffer, int newBufferSize);
realloc malloc or calloc memory, return new address
void* free(void *memory);
Release malloc or calloc returned pointer
char* itoa(int number, char *toString, int base);
Transfer given number to given base
char* ltoa(long number, char *toString, int base);
Transfer given 64bit number to given base
int atoi(char *fromString);
Read an integer from given string
double atof(char *fromString);
Read an double from given string
long atol(char *fromString);
Read an long from given string
long atoll(char *fromString);
Read an long long from given string (Same with atol on 64-bit platform)
int rand();
Generate a random number ranged [0, RAND_MAX)
void srand(unsigned int seed);
Use the random seed to generate a random number ranged [0, RAND_MAX)
int system(char *command);
Execute system terminal command
long MAX(long a, long b);
Return the max value of given number
long MIN(long a, long b);
Return the min value of given number
long max(long a, long b);
Return the max value of given number
long min(long a, long b);
Return the min value of given number
double maxf(double a, double b);
Return the max value of given number
double minf(double a, double b);
Return the min value of given number
void qsort(void *base, int num, int size, sort_comparator comparator);
Sort the given array, use quick sort method
int RAND_MAX;
Description the max number of rand() can return
sort_comparator int_comparator;
Ascending Comparator, for int element
sort_comparator long_comparator;
Ascending Comparator, for long element
sort_comparator double_comparator;
Ascending Comparator, for double element
int (* sort_comparator)(const void *arg1, const void *arg2);
表示一个用于排序函数的比较器函数指针参数,例如qsort
void exit(int exitCode);
退出程序
void abs(int inValue);
对整数取绝对值
void* malloc(size_t size);
从堆中申请内存
void* calloc(int numOfArray, size_t arrayElemSize);
从堆中申请内存,并清零,适用于数组创建
void* realloc(void *oldBuffer, int newBufferSize);
将malloc或calloc申请的内容扩充长度,返回新的地址
void* free(void *memory);
释放malloc或calloc申请的内存
char* itoa(int number, char *toString, int base);
将指定的数字转换为指定进制的字符串表示
char* ltoa(long number, char *toString, int base);
将指定的64bit数字转换为指定进制的字符串表示
int atoi(char *fromString);
从指定的字符串中读取一个int
double atof(char *fromString);
从指定的字符串中读取一个double
long atol(char *fromString);
从指定的字符串中读取一个long
long atoll(char *fromString);
从指定的字符串中读取一个long long (64位下等同于atol)
int rand();
生成一个[0, RAND_MAX)的随机数
void srand(unsigned int seed);
使用随机种子生成一个[0, RAND_MAX)的随机数
int system(char *command);
执行系统终端命令
long MAX(long a, long b);
返回参数中最大的那个数
long MIN(long a, long b);
返回参数中最小的那个数
long max(long a, long b);
返回参数中最大的那个数
long min(long a, long b);
返回参数中最小的那个数
double maxf(double a, double b);
返回参数中最大的那个数
double minf(double a, double b);
返回参数中最小的那个数
void qsort(void *base, int num, int size, sort_comparator comparator);
对给定的数组进行排序,使用快速排序算法
int RAND_MAX;
表示rand函数可以返回的最大数字
sort_comparator int_comparator;
升序比较器,用于int类型元素的数组
sort_comparator long_comparator;
升序比较器,用于long类型元素的数组
sort_comparator double_comparator;
升序比较器,用于double类型元素的数组