Skip to Content
C语言核心技术(原书第2版)
book

C语言核心技术(原书第2版)

by Peter Prinz, Tony Crawford
August 2017
Intermediate to advanced
798 pages
17h 44m
Chinese
China Machine Press
Content preview from C语言核心技术(原书第2版)
333
第18章
标准库函数
本章按照英文字母顺序介绍标准
ANSI C
链接库中的函数。本章所介绍的大多数函数都属
于
1989 ANSI
标准,或者属于
1990
的“
Normative Addendum
”
(
基准增补
)
,目前主流编
译器都完全支持这些函数。
ISO/IEC 9899: 1999
标准(“
C99
”)新增了一些函数,它们
也被现用主流编译器支持,本章在介绍
C99
中新增的这些函数时,会加上“
C99
”标签。
但是,
ISO/IEC 9899 : 2011
标准(“
C11
”)新增的函数并非全部受到编译器的支持,它
们中大多数对于编译器属于可选支持的,例如多线程和边界检查函数。本章在介绍
C11
中新增的这些函数时,会加上“
C11
”标签。
每个函数介绍包括:函数的用途、返回值、函数的原型、声明该函数的头文件,以及一
个简短的示例。为简洁起见,本章在介绍函数所附的示例中,不一定总会出现
main()
函
数以及指示头文件的
#include
命令。当使用本章所介绍的函数时,请记得通过包含相应
的文件以在程序中提供对每个标准函数的声明。此外,任何文件名可能也包括相对路径
或绝对路径。关于标准库函数调用的错误和异常的相关信息,请参考第
16
章的标准头文
件
math.h
、
fenv.h
和
errno.h
。
在遵循
C11
且支持安全函数的实现版本中(也就是函数名中具有后缀
_s
的边界检查函
数),应用下列规则:在采用
include
命令包含具有所需函数声明的头文件之前,必须
将宏
__STDC_WANT_LIB_EXT1__
的值定义为
1
。关于使用安全函数的更多介绍,请参见 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法精讲视频课程:24篇系列讲座

算法精讲视频课程:24篇系列讲座

罗伯特·塞奇威克, 凯文·韦恩(Kevin Wayne)

Publisher Resources

ISBN: 9787111562207