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版)
12
|
第
1
章
提供有关文件操作或动态内存管理等语句。实际上,它甚至不直接提供控制台输入和输
出语句。它通过采用扩展的
C
标准库,为各式各样的编程目的提供所需的函数。
C
语言的设计方式使得
C
编译器相当简洁,并且很容易移植到新的系统。而且,一旦编译
器在新的系统上执行,就可以直接编译标准库中的大部分功能,而无需作任何修改,因
为它们(标准库)是用可移植的
C
语言编写的。因此,
C
编译器几乎适用于所有的计算机
系统。
由于
C
语言专门为系统编程而开发,因此,它目前主要用于嵌入式系统开发,这一点不
会让我们感到惊讶。然而同时,也有许多开发者把
C
语言作为一个可移植的、结构化的
高级语言使用,以开发诸如文字处理器、数据库和图形应用程序。
1.2 C语言程序的结构
C
语言程序由函数(
function
)组成,一个函数可以调用其他函数。对于一个设计良好的
程序,每个函数实现特定的目的。函数包含循序执行的语句(
statement
),语句也可以
分组聚集在一起以形成语句块(
block statement
),或者称为块(
block
)。程序员可以
使用标准库中预先编好的函数,如果没有满足需求的标准函数,也可以使用自己编写的
函数。除
C
标准库外,还有许多特殊链接库可以使用,例如图形函数链接库。然而,如
果使用非标准库,则会限制所开发程序的可移植性,这些程序只能移植到已经加载了这
些非标准库的系统上。
每个
C
程序都必须定义至少一个函数,它有个特定名
main()
,它是程序开始执行时第一
个被调用的函数。函数
main()
是程序结构中最顶层的函数,其他函数会以子程序( ...
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

数据库系统内幕

数据库系统内幕

Alex Petrov
精通機器學習

精通機器學習

Aurélien Géron
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
算法精讲视频课程:24篇系列讲座

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

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

Publisher Resources

ISBN: 9787111562207