c语言标准函数库pdf c语言基本函数库

《c语言大全第四版》pdf下载在线阅读全文,求百度网盘云资源

《c语言大全第四版》百度网盘pdf最新全集下载:

创新互联建站为企业级客户提高一站式互联网+设计服务,主要包括网站设计、做网站app开发定制小程序定制开发、宣传片制作、LOGO设计等,帮助客户快速提升营销能力和企业形象,创新互联各部门都有经验丰富的经验,可以确保每一个作品的质量和创作周期,同时每年都有很多新员工加入,为我们带来大量新的创意。 

链接:

?pwd=hizl 提取码:hizl

简介:C语言大全第四版详细讨论了C语言及其函数库的各个方面,主要强调ANS/ISO标准的C语言内容涵盖了C89和C99。  

C 语言标准库函数

C语言标准库函数

标准io函数

Standard C I/O

clearerr() clears errors

fclose() close a file

feof() true if at the end-of-file

ferror() checks for a file error

fflush() writes the contents of the output buffer

fgetc() get a character from a stream

fgetpos() get the file position indicator

fgets() get a string of characters from a stream

fopen() open a file

fprintf() print formatted output to a file

fputc() write a character to a file

fputs() write a string to a file

fread() read from a file

freopen() open an existing stream with a different name

fscanf() read formatted input from a file

fseek() move to a specific location in a file

fsetpos() move to a specific location in a file

ftell() returns the current file position indicator

fwrite() write to a file

getc() read a character from a file

getchar() read a character from STDIN

gets() read a string from STDIN

perror() displays a string version of the current error to STDERR

printf() write formatted output to STDOUT

putc() write a character to a stream

putchar() write a character to STDOUT

puts() write a string to STDOUT

remove() erase a file

rename() rename a file

rewind() move the file position indicator to the beginning of a file

scanf() read formatted input from STDIN

setbuf() set the buffer for a specific stream

setvbuf() set the buffer and size for a specific stream

sprintf() write formatted output to a buffer

sscanf() read formatted input from a buffer

tmpfile() return a pointer to a temporary file

tmpnam() return a unique filename

ungetc() puts a character back into a stream

vprintf, vfprintf, vsprintf write formatted output with variable argument lists

标准字符/字符串处理函数

atof() converts a string to a double

atoi() converts a string to an integer

atol() converts a string to a long

isalnum() true if alphanumeric

isalpha() true if alphabetic

iscntrl() true if control character

isdigit() true if digit

isgraph() true if a graphical character

islower() true if lowercase

isprint() true if a printing character

ispunct() true if punctuation

isspace() true if space

isupper() true if uppercase character

isxdigit() true if a hexidecimal character

memchr() searches an array for the first occurance of a character

memcmp() compares two buffers

memcpy() copies one buffer to another

memmove() moves one buffer to another

memset() fills a buffer with a character

strcat() concatenates two strings

strchr() finds the first occurance of a character in a string

strcmp() compares two strings

strcoll() compares two strings in accordance to the current locale

strcpy() copies one string to another

strcspn() searches one string for any characters in another

strerror() returns a text version of a given error code

strlen() returns the length of a given string

strncat() concatenates a certain amount of characters of two strings

strncmp() compares a certain amount of characters of two strings

strncpy() copies a certain amount of characters from one string to another

strpbrk() finds the first location of any character in one string, in another string

strrchr() finds the last occurance of a character in a string

strspn() returns the length of a substring of characters of a string

strstr() finds the first occurance of a substring of characters

strtod() converts a string to a double

strtok() finds the next token in a string

strtol() converts a string to a long

strtoul() converts a string to an unsigned long

strxfrm() converts a substring so that it can be used by string comparison functions

tolower() converts a character to lowercase

toupper() converts a character to uppercase

标准数学函数

abs() absolute value

acos() arc cosine

asin() arc sine

atan() arc tangent

atan2() arc tangent, using signs to determine quadrants

ceil() the smallest integer not less than a certain value

cos() cosine

cosh() hyperbolic cosine

div() returns the quotient and remainder of a division

exp() returns "e" raised to a given power

fabs() absolute value for floating-point numbers

floor() returns the largest integer not greater than a given value

fmod() returns the remainder of a division

frexp() decomposes a number into scientific notation

labs() absolute value for long integers

ldexp() computes a number in scientific notation

ldiv() returns the quotient and remainder of a division, in long integer form

log() natural logarithm

log10() natural logarithm, in base 10

modf() decomposes a number into integer and fractional parts

pow() returns a given number raised to another number

sin() sine

sinh() hyperbolic sine

sqrt() square root

tan() tangent

tanh() hyperbolic tangent

标准时间/日期函数

asctime() a textual version of the time

clock() returns the amount of time that the program has been running

ctime() returns a specifically formatted version of the time

difftime() the difference between two times

gmtime() returns a pointer to the current Greenwich Mean Time

localtime() returns a pointer to the current time

mktime() returns the calendar version of a given time

strftime() returns individual elements of the date and time

time() returns the current calendar time of the system

标准内存管理函数

calloc() allocates a two-dimensional chunk of memory

free() makes memory available for future allocation

malloc() allocates memory

realloc() changes the size of previously allocated memory

其它标准函数

abort() stops the program

assert() stops the program if an expression isn';t true

atexit() sets a function to be called when the program exits

bsearch() perform a binary search

exit() stop the program

getenv() get enviornment information about a variable

longjmp() start execution at a certain point in the program

qsort() perform a quicksort

raise() send a signal to the program

rand() returns a pseudorandom number

setjmp() set execution to start at a certain point

signal() register a function as a signal handler

srand() initialize the random number generator

system() perform a system call

va_arg() use variable length parameter lists

C语言中的标准函数有哪些

C语言输入输出函数有很多,标准I/O函数中包含了如下几个常用的函数:

scanf,printf,getc,putc,getchar,putchar,gets,puts,fgets,fputs,fgetc,fputc,fscanf,fprintf等.

int getc(FILE *fp)

getc主要是从文件中读出一个字符.常用的判断文件是否读取结束的语句为 (ch = getc(fp)) != EOF.EOF为文件结束标志,定义在stdio.h中,就像EXIT_SUCCESS,EXIT_FAILURE定义在stdlib.h中一样,文件也可以被理解为一种流,所以当fp为stdin时,getc(stdin)就等同于getchar()了.

int putc(int ch,FILE *fp)

putc主要是把字符ch写到文件fp中去.如果fp为stdout,则putc就等同于putchar()了.

int getchar(void)

getchar主要是从标准输入流读取一个字符.默认的标准输入流即stdio.h中定义的stdin.但是从输入流中读取字符时又涉及到缓冲的问题,所以并不是在屏幕中敲上一个字符程序就会运行,一般是通过在屏幕上敲上回车键,然后将回车前的字符串放在缓冲区中,getchar就是在缓冲区中一个一个的读字符.当然也可以在while循环中指定终止字符,如下面的语句:while ((c = getchar()) != '#')这是以#来结束的.

int putchar(int ch)

putchar(ch)主要是把字符ch写到标准流stdout中去.

char * gets(char *str)

gets主要是从标准输入流读取字符串并回显,读到换行符时退出,并会将换行符省去.

int puts(char *str)

puts主要是把字符串str写到标准流stdout中去,并会在输出到最后时添加一个换行符.

char *fgets(char *str, int num, FILE *fp)

str是存放读入的字符数组指针,num是最大允许的读入字符数,fp是文件指针.fgets的功能是读一行字符,该行的字符数不大于num-1.因为fgets函数会在末尾加上一个空字符以构成一个字符串.另外fgets在读取到换行符后不会将其省略.

int fputs(char *str, file *fp)

fputs将str写入fp.fputs与puts的不同之处是fputs在打印时并不添加换行符.

int fgetc(FILE *fp)

fgetc从fp的当前位置读取一个字符.

int fputc(int ch, file *fp)

fputc是将ch写入fp当前指定位置.

int fscanf(FILE *fp, char *format, 输入列表)

fscanf按照指定格式从文件中出读出数据,并赋值到参数列表中.

int fprintf(FILE *fp, char *format, 输出列表)

fprintf将格式化数据写入流式文件中.

数据块读写函数

fread (buffer,size,count,fp);

fwrite(buffer,size,count,fp);

参数说明:

buffer:是一个指针。

对fread 来说,它是读入数据的存放地址。

对fwrite来说,是要输出数据的地址(均指起始地址)。

size: 要读写的字节数。

count: 要进行读写多少个size字节的数据项。

fp: 文件型指针。


本文题目:c语言标准函数库pdf c语言基本函数库
标题URL:http://pwwzsj.com/article/hhpoeg.html