C语言常用函数所在的头文件

stdio.h


#include <stdio.h>

FILE   *fopen(const char  *filename,  const char   *mode);
int        fclose(FILE   *stream);
int         fflush(FILE   *stream);
size_t   fread(void    *buffer,  size_t size, size_t count, FILE  *stream);
size_t    fwrite(const void  *buffer, size_t size, size_t count,   FILE *stream);
long   ftell(FILE  *stream);
int       fseek(FILE  *stream, long   offset,   int  origin);
void     rewind(FILE  *stream);

stdlib.h

#include <stdlib.h>

void*  malloc(size_t size);
void*  free(void* ptr);

//  Allocates memory for an array of num objects of size size and initializes all bytes in the allocated storage to zero.
// num :  the number  of   elements
// size : size of each element
void*  calloc(size_t num, size_t size);
void*   realloc(void*  ptr, size_t  new_size);

int  atoi(const char   *str);
long  atol(const char   *str);
long  long  atoll(const  char   *str);
double atof(const   char    *str);

stdbool.h

#include <stdbool.h>   // Support boolean type
bool   b1 = true;
bool   b2 = false;

stddef.h

#include <stddef.h>
size_t
ptrdiff_t
NULL

string.h

#include <string.h>
int    isalnum( int  ch);
int     isalpha( int   ch);
int     islower(int  ch);
int     isupper(int  ch);


// int ch :    ch is in byte unit
void*   memset(void *dest, int ch, size_t count);
size_t   strlen(const char* str);
int  strcmp(const char   *lhs,  const char   *rhs);
posted @   EdisoNewton  阅读(21)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· winform 绘制太阳,地球,月球 运作规律
· 上周热点回顾(3.3-3.9)
点击右上角即可分享
微信分享提示