。
原型: int feof( FILE *stream );
功能: 测试文件是否结束。
原型: int ungetc( int c, FILE *stream );
功能: 将一个字符退回文件缓冲区中,下次用fgetc()等函数即可读此字符。
原型: int rename( const char *oldname, const char *newname );
功能: 修改文件名。
原型: int _unlink( const char *filename );
功能: 删除文件。原型在头文件Stdio.h和io.h中。
6.
存储分配库函数,原型均在头文件malloc.h中。
原型: void *malloc( size_t size );
功能: 按字节申请存储空间。
原型: void *calloc( size_t num, size_t size );
功能: 成组申请存储空间。
原型: void *realloc( void *memblock, size_t size );
功能: 修改已动态分配的存储块大小。
原型: void free( void *memblock );
功能: 释放动态申请的存储块。
7.内存操作函数,除特别说明者外,原型均在头文件memory.h 和string.h中。
原型: void *memset( void *dest, int c, size_t count ) ;
功能: 将一段内存均置为给定的内容。
原型: int memcmp( const void *buf1, const void *buf2, size_t count );
int _memicmp( const void *buf1, const void *buf2, unsigned int count );
功能: 比较两段存储空间的内容。_memicmp()不区分大、小写字母。
原型: void *memchr( const void *buf, int c, size_t count );
功能: 在指定内存单元中查找字符。。
原型: void *memcpy( void *dest, const void *src, size_t count );
void *memmove( void *dest, const void *src, size_t count );
功能: 复制一段给定的内存单元内容。memcpy()与memmove()的复制方向不同,这在源空间和目标空间有重叠时特别重要。
8.字符串操作库函数,原型均在头文件string.h中。这组库函数甚多,这里只选列了其中较常用的几个。
原型: char *_strset( char *string, int c );
char *_strnset( char *string, int c, size_t count );
功能: 将字符串中的字符设置为给定值。
原型: char *strcpy( char *strDestination, const char *strSource ) ;
char *strncpy( char *strDest, const char *strSource, size_t count );
功能: 字符串拷贝。
原型: char *strcat( char *strDest, const char *strSource );
char *strncat( char *strDest, const char *strSource, size_t count );
功能: 将字符串strSource 添加在字符串strDest之后。
原型: char *_strlwr( char *string );
char *_strupr( char *string );
功能: 将字符串中的字母字符均转换为小写/大写字母。
原型: char *_strrev( char *string );
功能: 反转字符串的内容。
原型: char *strchr( const char *string, int c );
功能: 在字符串string中查找指定字符c
原型: char *strstr( const char *string, const char *strCharSet );
功能: 在字符串中查找指定子字符串。
原型: int strcmp( const char *string1, const char *string2 );
int _stricmp( const char *string1, const char *string2 );
int strncmp( const char *string1, const char *string2, size_t count );
int _strnicmp( const char *string1, const char *string2, size_t count );
功能: 比较两个字符串。stricmp()在比较时不区对大小写字母;strncmp()仅比较两字符串的前maxlen位
;strnicmp()仅比较两字符串的前maxlen位,且比较时不区分大小写字母。如果两字符串相同,则返回地否则返回非0值。
原型: size_t strlen( const char *string );
功能: 求字符串长度。
9.数学运算库函数,原型均在头文件math.h。
原型: int abs( int n );
double fabs(double x);
long labs(long x);
功能: 求绝对值。
原型: double _cabs( struct _complex z );
功能: 求复数的模。
原型: double sin(double);
double cos(double x);
double tan(double x);
double asin(double x);
double acos(double x);
double atan(double x);
double atan2(double y, double x);
功能: 求三角函数和反三角函数。
原型: double sinh(double);
double cosh(double x);
double tanh(double x);
功能: 求双曲函数。
原型: double exp(double);
double log(double x);
double log10(double x);
double pow(double x, double y);
double sqrt(double x);
功能: 求指数、对数、幂函数和平方根。
原型: int max(int a,int b);
int min(int a,int b);
功能: 求两数中的较大者或较小者。这两个库函数均为定义于头文件则州地 h中的带参数的宏。
原型: double _hypot( double x, double y );
功能: 计算直角三角形斜边的长。
10.时间函数,原型均在头文件 time.h 中。
原型: time_t time ( time_t *timer );
功能: 取当前
系统时间。其中类型 time_t(相当于long int)存放自1970年1月1日午夜起流逝的秒数。
原型: char *ctime ( const time_t *timer );
功能: 将以 time_t 格式存放的时间转换为相应的字符串,结果为一静态字符串的地址,其格式形如:“Wed Jan 02 02:03:55 1980\n”。
原型: double difftime ( time_t timer1, t