C标准库
索引:
1 输入与输出
1.1 文件操作
1.1.1 fopen
1.1.2 freopen
1.1.3 fflush
1.1.4 fclose
1.1.5 remove
1.1.6 rename
1.1.7 tmpfile
1.1.8 tmpnam
1.1.9 setvbuf
1.1.10 setbuf
1.2 格式化输出
1.2.1 fprintf
1.2.2 printf
1.2.3 sprintf
1.2.4 snprintf
1.2.5 vprintf
1.2.6 vfprintf
1.2.7 vsprintf
1.2.8 vsnprintf
1.3 格式化输入
1.3.1 fscanf
1.3.2 scanf
1.3.3 sscanf
1.4 字符输入输出函数
1.4.1 fgetc
1.4.2 fgets
1.4.3 fputc
1.4.4 fputs
1.4.5 getc
1.4.6 getchar
1.4.7 gets
1.4.8 putc
1.4.9 putchar
1.4.10 puts
1.4.11 ungetc
1.5 直接输入输出函数
1.5.1 fread
1.5.2 fwrite
1.6 文件定位函数
1.6.1 fseek
1.6.2 ftell
1.6.3 rewind
1.6.4 fgetpos
1.6.5 fsetpos
1.7 错误处理函数
1.7.1 clearerr
1.7.2 feof
1.7.3 ferror
1.7.4 perror
2 字符类测试
2.1 isalnum
2.2 isalpha
2.3 iscntrl
2.4 isdigit
2.5 isgraph
2.6 islower
2.7 isprint
2.8 ispunct
2.9 isspace
2.10 isupper
2.11 isxdigit
2.12 tolower
2.13 toupper
3 字符串函数
3.1 strcpy
3.2 strncpy
3.3 strcat
3.4 strncat
3.5 strcmp
3.6 strncmp
3.7 strchr
3.8 strrchr
3.9 strspn
3.10 strcspn
3.11 strpbrk
3.12 strstr
3.13 strlen
3.14 strerror
3.15 strtok
3.16 memcpy
3.17 memmove
3.18 memcmp
3.19 memchr
3.20 memset
4 数学函数
4.1 sin
4.2 cos
4.3 tan
4.4 asin
4.5 acos
4.6 atan
4.7 atan2
4.8 sinh
4.9 cosh
4.10 tanh
4.11 exp
4.12 log
4.13 log10
4.14 pow
4.15 sqrt
4.16 ceil
4.17 floor
4.18 fabs
4.19 ldexp
4.20 frexp
4.21 modf
4.22 fmod
5 实用函数
5.1 atof
5.2 atoi
5.3 atol
5.4 strtod
5.5 strtol
5.6 strtoul
5.7 rand
5.8 srand
5.9 calloc
5.10 malloc
5.11 realloc
5.12 free
5.13 abort
5.14 exit
5.15 atexit
5.16 system
5.17 getenv
5.18 bsearch
5.19 qsort
5.20 abs
5.21 labs
5.22 div
5.23 ldiv
6 诊断
6.1 assert
7 变长变元表
7.1 va_start
7.2 va_arg
7.3 va_end
8 非局部跳转
8.1 setjmp
8.2 longjmp
9 信号处理
9.1 signal
9.2 raise
10 日期与时间函数
10.1 clock
10.2 time
10.3 difftime
10.4 mktime
10.5 asctime
10.6 ctime
10.7 gmtime
10.8
相关文档:
本文仅限于C,主要自己老忘。别的废话少说。
1.Basic
首先考虑函数在函数体内的定义,如下:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int add(int,int);
int def(int, int);
printf("%d\n", add(1,3));
printf("%d\n", def(3,1));
  ......
1. 什么是空指针常量(null pointer constant)?
[ 6.3.2.3-3] An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant.
这里告诉我们:0、0L、'\0'、3 - 3、0 * 17 (它们都是“integer constant expression”)以及 ......
一、屏幕操作函数
1. clrscr()清除字符窗口函数
2. window()字符窗口函数
3. gotoxy()光标定位函数
4. clreol() 清除光标行尾字符函数
5. insline() 插入空行函数
6. delline() 删除一行函数
7. gettext() 拷进文字函数
8. puttext() 拷出文字函数
9. movetext() 移动文字函数
二、字符属性函数
10. textmode( ......
//输入参数:*str 搜索字符串
// subStrLen 用于返回找到的最大子字符串长度
//返回:找到的最大子字符串指针
char * findMaxSubStr(char *str, int &subStrLen){
char *subStr;
char *p = str;
int index[256] ;
for (int ix = 0; ix < sizeof(index)/sizeof(index[0]); ix++)
{
in ......