c常用函数,保持更新

1.自定义bool类型

typedef enum {FALSE = 0,TRUE = !FALSE} BOOL;

 2.strlen函数:返回字符串的长度

int strlen(char s[])
{
     int i;
     
     i = 0;
     while (s[i] != '\0')
     {
         ++i;
     }
     return i;                           
}
原文地址:https://www.cnblogs.com/zhaozhilu/p/2802935.html