#include <assert.h> //设定插入点
#include <ctype.h> //字符处理
#include <errno.h> //定义错误码
#include <float.h> //浮点数处理
#include <fstream.h> //文件输入/输出
#include <iomanip.h> //参数化输入/输出
#include <iostream.h> //数据流输入/输出
#include <limits.h> //定义各种数据类型最值常量
#include <locale.h> //定义本地化函数
#include <math.h> //定义数学函数
#include <stdio.h> //定义输入/输出函数
#include <stdlib.h> //定义杂项函数及内存分配函数
#include <string.h> //字符串处理
#include <strstrea.h> //基于数组的输入/输出
#include <time.h> //定义关于时间的函数
#include <wchar.h> //宽字符处理及输入/输出
#include <wctype.h> //宽字符分类
#include <complex> //复数类
#include <ios> //基本输入/输出支持
#include <iosfwd> //输入/输出系统使用的前置声明
#include <iostream>
#include <istream> //基本输入流
#include <ostream> //基本输出流
#include <queue> //STL 队列容器
#include <set> //STL 集合容器
#include <sstream> //基于字符串的流
#include <stack> //STL 堆栈容器
#include <stdexcept> //标准异常类
#include <streambuf> //底层输入/输出支持
#include <string> //字符串类
#include <utility> //STL 通用模板类
#include <vector> //STL 动态数组容器
#include <dos.h>通用dos中断接口函数
#include <conio.h>)驻留并退出函数

常用函数

程序应包含在math.h

函数类型

函数形式

功能

类型

数学函数

abs(int i)

求整数的绝对值

int

fabs(double x)

返回浮点数的绝对值

double

floor(double x)

向下舍入

double

fmod(double x, double y)

计算x对y的模, 即x/y的余数

double

exp(double x)

指数函数

double

log(double x)

对数函数ln(x)

double

log10(double x)

对数函数log

double

labs(long n)

取长整型绝对值

long

modf(double value, double *iptr)

把数分为指数和尾数

double

pow(double x, double y)

指数函数(x的y次方)

double

sqrt(double x)

计算平方根

double

sin(double x)

正弦函数

double

asin(double x)

反正弦函数

double

sinh(double x)

双曲正弦函数

double

cos(double x);

余弦函数

double

acos(double x)

反余弦函数

double

cosh(double x)

双曲余弦函数

double

tan(double x)

正切函数

double

atan(double x)

反正切函数

double

tanh(double x)

双曲正切函数

double

数学函数

abs(int i)

求整数的绝对值

int

fabs(double x)

返回浮点数的绝对值

double

floor(double x)

向下舍入

double

fmod(double x, double y)

计算x对y的模, 即x/y的余数

double

exp(double x)

指数函数

double

log(double x)

对数函数ln(x)

double

log10(double x)

对数函数log

double

labs(long n)

取长整型绝对值

long

modf(double value, double *iptr)

把数分为指数和尾数

double

pow(double x, double y)

指数函数(x的y次方)

double

sqrt(double x)

计算平方根

double

sin(double x)

正弦函数

double

asin(double x)

反正弦函数

double

sinh(double x)

双曲正弦函数

double

cos(double x);

余弦函数

double

acos(double x)

反余弦函数

double

cosh(double x)

双曲余弦函数

double

tan(double x)

正切函数

double

atan(double x)

反正切函数

double

tanh(double x)

双曲正切函数

double

程序应包含在string.h

函数类型

函数形式

功能

类型

字符串函数

strcat(char *dest,const char *src)

将字符串src添加到dest末尾

char

strchr(const char *s,int c)

检索并返回字符c在字符串s中第一次出现的位置

char

strcmp(const char *s1,const char *s2)

比较字符串s1与s2的大小,并返回s1-s2

int

stpcpy(char
*dest,const char *src)

将字符串src复制到dest

char

strdup(const
char *s)

将字符串s复制到最近建立的单元

char

strlen(const
char *s)

返回字符串s的长度

int

strlwr(char
*s)

将字符串s中的大写字母全部转换成小写字母,并返回转换后的字符串

char

strrev(char
*s)

将字符串s中的字符全部颠倒顺序重新排列,并返回排列后的字符串

char

strset(char
*s,int ch)

将一个字符串s中的所有字符置于一个给定的字符ch

char

strspn(const
char *s1,const char *s2)

扫描字符串s1,并返回在s1和s2中均有的字符个数

char

strstr(const
char *s1,const char *s2)

描字符串s2,并返回第一次出现s1的位置

char

strtok(char
*s1,const char *s2)

检索字符串s1,该字符串s1是由字符串s2中定义的定界符所分隔

char

strupr(char *s)

将字符串s中的小写字母全部转换成大写字母,并返回转换后的字符串

char

程序应包含在ctype.h

函数类型

函数形式

功能

类型

字符函数

isalpha(int 
ch)

若ch是字母('A'-'Z','a'-'z')返回非0值,否则返回0

int

isalnum(int  ch)

若ch是字母('A'-'Z','a'-'z')或数字('0'-'9')返回非0值,否则返回0

int

isascii(int 
ch)

若ch是字符(ASCII码中的0-127)返回非0值,否则返回0

int

iscntrl(int 
ch)

若ch是作废字符(0x7F)或普通控制字符(0x00-0x1F)返回非0值,否则返回0

int

isdigit(int 
ch)

若ch是数字('0'-'9')返回非0值,否则返回0

int

isgraph(int  ch)

若ch是可打印字符(不含空格)(0x21-0x7E)返回非0值,否则返回0

int

islower(int 
ch)

若ch是小写字母('a'-'z')返回非0值,否则返回0

int

isprint(int 
ch)

若ch是可打印字符(含空格)(0x20-0x7E)返回非0值,否则返回0

int

ispunct(int  ch)

若ch是标点字符(0x00-0x1F)返回非0值,否则返回0

int

isspace(int 
ch) 

若ch是空格('  '),水平制表符('\t'),回车符('\r'), 走纸换行('\f'),垂直制表符('\v'),换行符('\n'),返回非0值,否则返回0

int

isupper(int  ch)

若ch是大写字母('A'-'Z')返回非0值,否则返回0

int

isxdigit(int  ch)

若ch是16进制数('0'-'9','A'-'F','a'-'f')返回非0值,否则返回0

int

tolower(int  ch)

若ch是大写字母('A'-'Z')返回相应的小写字母('a'-'z')

int

toupper(int  ch)

若ch是小写字母('a'-'z')返回相应的大写字母('A'-'Z')

int

程序应包含在stdio.h

函数类型

函数形式

功能

类型

输入输出函数

getch() 

从控制台(键盘)读一个字符,不显示在屏幕上

int

putch() 

向控制台(键盘)写一个字符

int

getchar()

从控制台(键盘)读一个字符,显示在屏幕上

int

putchar() 

向控制台(键盘)写一个字符

int

getchar() 

从控制台(键盘)读一个字符,显示在屏幕上

int

getc(FILE  *stream)

从流stream中读一个字符,并返回这个字符

int

putc(int  ch,FILE  *stream)

向流stream写入一个字符ch

int

getw(FILE  *stream)

从流stream读入一个整数,错误返回EOF

int

putw(int  w,FILE  *stream)

向流stream写入一个整数

int

fclose(handle)

关闭handle所表示的文件处理

FILE
*

fgetc(FILE  *stream)

从流stream处读一个字符,并返回这个字符

int

fputc(int  ch,FILE  *stream)

将字符ch写入流stream中

int

fgets(char  *string,int  n,FILE  *stream)

流stream中读n个字符存入string中

c
har *

fopen(char *filename,char *type)

打开一个文件filename,打开方式为type,并返回这个文件指针,type可为以下字符串加上后缀

FILE
*

fputs(char  *string,FILE  *stream)

将字符串string写入流stream中

int

fread(void  *ptr,int  size,int  nitems,FILE 
*stream)

从流stream中读入nitems个长度为size的字符串存入ptr中

int

fwrite(void  *ptr,int  size,int  nitems,FILE 
*stream)

向流stream中写入nitems个长度为size的字符串,字符串在ptr中

int

fscanf(FILE  *stream,char  *format[,argument,…])

以格式化形式从流stream中读入一个字符串

int

fprintf(FILE  *stream,char  *format[,argument,…])

以格式化形式将一个字符串写给指定的流stream

int

scanf(char *format[,argument…])

从控制台读入一个字符串,分别对各个参数进行赋值,使用BIOS进行输出

int

printf(char *format[,argument,…])

发送格式化字符串输出给控制台(显示器),使用BIOS进行输出

int

C语音常用库和函数的更多相关文章

  1. C++的一些小操作、常用库及函数(持续更新)

    1. 强制保留n位小数(位数不足则强制补零) 头文件: #include <iomanip> 在输出前: cout<<setprecision(n); 也有不用头文件的方式,在 ...

  2. 常用的WinAPI函数整理

    常用的WinAPI函数整理 一.进程  创建进程:    CreateProcess("C:\\windows\\notepad.exe",0,0,0,0,0,0,0,&s ...

  3. 转:不应该不知道C++的常用库

    不应该不知道C++的常用库 非常惭愧,我过去也仅仅了解boost.STLport这样的库,以及一些GUI库,但是居然有如此众多的C++库,其实令我惊讶.当然,这个问题应该辩证的看,对于拿来主义确实可以 ...

  4. 【python游戏编程之旅】第四篇---pygame中加载位图与常用的数学函数。

    本系列博客介绍以python+pygame库进行小游戏的开发.有写的不对之处还望各位海涵. 在上一篇博客中,我们学习了pygame事件与设备轮询.http://www.cnblogs.com/msxh ...

  5. JSP标签JSTL(5)--常用的标签函数

    在使用JSTL的标签函数的时候请务必加上如下代码 <!-- 添加jsp标签的核心库 --> <%@ taglib uri="http://java.sun.com/jsp/ ...

  6. Atitit 数据库 标准库  sdk 函数库 编程语言 mysql oracle  attilax总结

    Atitit 数据库 标准库  sdk 函数库 编程语言 mysql oracle  attilax总结 1.1. 常见的编程语言以及数据库 sql内部函数库标准化库一般有以下api1 1.2. 各个 ...

  7. python中的运算符及表达式及常用内置函数

    知识内容: 1.运算符与表达式 2.for\while初步了解 3.常用内置函数 一.运算符与表达式 python与其他语言一样支持大多数算数运算符.关系运算符.逻辑运算符以及位运算符,并且有和大多数 ...

  8. 常用的OpenCV函数速查

    常用的OpenCV函数速查 1.cvLoadImage:将图像文件加载至内存: 2.cvNamedWindow:在屏幕上创建一个窗口: 3.cvShowImage:在一个已创建好的窗口中显示图像: 4 ...

  9. Altium Designer 10 | 常用库及部分元件名中英文对照表

    ———————————————————————————————————————————— 常用库及部分元件名中英文对照表 - - - - - - - - - - - - - - - - - - - - ...

随机推荐

  1. 系统弹性概念[TODO]

    系统弹性 Shopify构建分布式可扩展应用的最佳实践 [编者的话]在构建大型分布式系统应用时,如何降低不同部分之间的依赖,增强系统的弹性,电商解决方案提供商 Shopify 给出了解决方法. 弹性矩 ...

  2. 2017 年值得一瞥的 JavaScript 相关技术趋势

    跨年前两天,Dan Abramov在Twitter上提了一个问题: JS社区毫不犹豫的抛出了它们对于新技术的预期与期待,本文内容也是总结自Twitter的回复,按照流行度降序排列.有一个尚未确定的小点 ...

  3. Windows下Nginx的安装与配置

    Nginx ("engine x") 是一款高性能的,轻量级的HTTP Web 服务器 和 反向代理服务器及电子邮件 IMAP/POP3/SMTP 代理服务器. Nginx 是由俄 ...

  4. String、Stringbuffer、StringBuilder的区别(转载)

    最近学习到StringBuffer,心中有好些疑问,搜索了一些关于String,StringBuffer,StringBuilder的东西,现在整理一下. 关于这三个类在字符串处理中的位置不言而喻,那 ...

  5. PHP的学习--PHP加密

    PHP中的加密方式有如下几种 1. MD5加密 string md5 ( string $str [, bool $raw_output = false ] ) 参数 str  --  原始字符串. ...

  6. uva133 救济金发放

    #include<stdio.h> #define maxn 20 ], n; int go( int p,int d,int t ) {// printf("a[%d]=%d\ ...

  7. websphere性能调优之dump命令

    websphere性能调优之dump命令 基于WebSphere 构建的企业应用,时常会出现性能问题,在严重的情况下还会提示出内存溢出,这是一件很让人恼怒的事情.在WebSphere Applicat ...

  8. LeetCode-Search in Rotated Sorted Array

    Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 migh ...

  9. /px/em/rem/的区别

    PX特点: 1 .IE无法调整那些使用px作为单位的字体大小: 2. 国外的大部分网站能够调整的原因在于其使用了em或rem作为字体单位: 3.Firefox能够调整px和em,rem,但是96%以上 ...

  10. Python之路,day4-Python基础

    1.集合2.元组 只读列表,只有count,index2个方法3.字典key-value对 1.特性 2.查询速度快,比列表快python中的hash在同一程序下值相同python字典中的hash只有 ...