【LeetCode】【标准函数库】待补充......

/* 
#include<math.h> 
*/
INT_MAX 

INT_MIN

int max= pow(2,31)-1;

/* 
#include<string.h>
*/
strncmp(str1,str2,len) //字符串比较函数:如果字符串s1与s2的前size个字符相同,函数返回值为0


/* 
#include<string.h>
*/
int *a = (int*) malloc( sizeof(int)*10 ); //内存申请
memcpy(dest, src, sizeof(int)*10);
memset(dest, 0 , sizeof(int)*10);


strcpy(dest, src); //只能是char类型


/* 
#include<stdlib.h>
*/
cmp(const void*a,const void*b)
{
return *(int*)a>*(int*)b //升序
}
qsort(dest, len, sizeof(int), cmp); //快速排序函数




/* 
#include<ctype.h>
*/
char 小写 = tolower('Z');
char 大写 = toupper('z');




猜你喜欢

转载自blog.csdn.net/qq1518572311/article/details/80343688