通過這 9 本開源好書學習 C 語言

本文由 伯樂在線 - 艾凌風 翻譯席覆。未經(jīng)許可,禁止轉(zhuǎn)載汹买!

英文出處: Steve Emms佩伤。歡迎加入翻譯組。

Books are very personal things. And programming books are no exception. We all form bonds with programming books that help master the rudiments of a language, and then be able to move on to fully exploit the language’s flexibility.

I have carefully considered the open source C books that are closest to my heart. I have identified 9 books that mean the most to me.

書是非常私人的東西晦毙,編程類書籍也不例外生巡。我們都是通過閱讀書籍來幫助我們掌握某種語言的基本知識的。隨后我們又通過见妒,閱讀書籍來探索這門語言的靈活性孤荣。我仔細的考察了一些我最喜愛的c語言書籍并從其中選出了對我意義最大的九本。

C is a general-purpose, procedural, portable, high-level programming language that is one of the most popular and influential languages. It was designed to be compiled using a straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. Many programming languages owe a considerable debt to C. It has become something of the lingua franca in the programming world.

c語言是一種通用的须揣、面向過程的高級編程語言盐股。也是最具流行度和影響力的編程語言之一。該語言在設計時就被設計為可以通過編譯器進行編譯耻卡,以此來對內(nèi)存進行底層操作并高效的執(zhí)行機器指令以及在運行時僅需要最小的支持疯汁。很多很多編程語言都得益于c語言。c語言就像是編程界的通用語言一樣卵酪。

C is fairly simple to understand. It allows the programmer to organize programs in a clear, easy, logical way. It is a very flexible, practical and compact language combined with an easy to read syntax. Code written in C runs quickly, with easy access to the low level facilities in the computer. Compiler directives make it possible to produce a single version of a program compiled for different architectures.

c語言非常易懂幌蚊。它允許程序員,能夠以一種簡潔溃卡、簡單霹肝、符合邏輯的方式來組織程序。這是一種非常靈活塑煎、實用并且簡潔的語言沫换,同時它還具有非常,容易讀懂的語法最铁。使用c語言編寫的代碼運行非逞渡停快±湮荆可以非常簡單的操作計算機的底層設施漱挎。通過編譯器的指令可以允許我們?yōu)椴煌w系結(jié)構(gòu)的設備生成同一個版本的程序。

C is about freedom. It therefore makes sense to learn C with books that also embody freedom. Take a look at my open source picks and see if any of them grab your fancy. Put the kettle on and enjoy.

c語言是自由的雀哨。因此學習c語言的書籍磕谅,也是自由的私爷。快來看看我挑選的開源書籍膊夹,有沒有哪一本能夠吸引你衬浑?好好享受它吧!

The C Book

《C語言》( The C Book

作者: Mike Banahan, Declan Brady 和 Mark Doran 放刨,350 頁

The C Book is designed for programmers who already have some experience of using a modern high-level procedural programming language. The book concentrates on the things that are special to C. In particular, it is the way that C is used which is focused on.

這本書是為那些已經(jīng)具備使用現(xiàn)代高級面向過程編程語言的程序員設計的工秩。這本書專注于那些c語言的特有之處。尤其是使用c語言的方式是這本書所重點關注的进统。

Chapters include:

包含以下章節(jié):

  • An Introduction to C Variables and Arithmetic – introduces some of the fundamentals of C, including keywords and identifiers, declaration of variables, real types, integral types, expressions and arithmetic, and constants

  • Control of Flow and Logical Expressions – looks at the various ways that the control of flow statements can be used in a C program, including some statements that have not been introduced so far. Control of flow, more logical expressions, and strange operators

  • Functions – the type of functions, recursion and argument passing, and linkage

  • Arrays and Pointers – arrays, pointers, character handling, sizeof and storage allocation, pointers to functions, expressions involving pointers, arrays, the & operator and function declarations

  • Structured Data Types – structures, unions, bitfields, enums, qualifiers and derived types, and initialization

  • The Preprocessor – how the preprocessor works, and directives

  • Specialized Areas of C – declarations, definitions and accessibility, typedef, const and volatile, and sequence points

  • Libraries – diagnostics, character handling, localization, limits, mathematical functions, non-local jumps, signal handling, variable numbers of arguments, input and output, formatted I/O, character I/O, unformatted I/O, random access functions, general utilities, string handling, and date and time

  • Complete Programs in C – putting it all together, arguments to main, interpreting program arguments, a pattern matching program, and a more ambitious example

  • 變量及運算法則介紹 – 介紹了 C 語言的基礎知識, 包括關鍵字和標識符助币,變量聲明,實數(shù)類型螟碎,整型眉菱,表達式和運算法則以及常量

  • 控制流及邏輯表達式 – 這一章介紹了在C語言中可以用于控制程序流程的幾種方法,包括一些尚未介紹的語句掉分。 控制流俭缓,邏輯表達式以及奇怪的運算符。

  • 函數(shù) – 函數(shù)的類型, 遞歸叉抡,傳參數(shù)以及鏈接

  • 數(shù)組和指針 – 數(shù)組, 指針, 字符處理, sizeof 以及儲存空間分配, 函數(shù)指針,包含指針的表達式答毫,數(shù)組褥民,&運算符以及函數(shù)聲明

  • 結(jié)構(gòu)體數(shù)據(jù)類型 – 結(jié)構(gòu)體, 聯(lián)合體, 位字段, 枚舉類型, 限定符、派生類型以及初始化

  • 預處理器 – 預處理器是如何工作的及其相關指令

  • C 語言中的一些特定內(nèi)容 – 聲明, 定義洗搂,typedef, constvolatile以及序列點

  • 庫 – 診斷, 字符處理, 本地化, 與具體實現(xiàn)相關的限制, 數(shù)學函數(shù), 非局部跳轉(zhuǎn), 信號處理, 可變參數(shù), 輸入輸出, 格式化 I/O, 字符 I/O, 無格式 I/O, 隨機訪問函數(shù), 通用函數(shù), 字符串處理, 日期和時間

  • C語言編寫的完整程序 – 綜合以上內(nèi)容, main函數(shù)的參數(shù), 解析程序參數(shù), 模式匹配程序以及一個難度更大的程序

The authors give the reader permission to do anything they want with the book provided there is an acknowledgement of the authors and their copyright. From what Mike Banahan has confirmed, the book is effectively under the Creative Commons License.

作者允許讀者利用此書做任何他們想做的事情消返,只需說明作者和版權(quán)。經(jīng)Mike Banahan確認耘拇,本書通過知識共享協(xié)議發(fā)布撵颊。

C Elements of Style

風格的要素——C語言版(C Elements of Style

By Steve Oualline (265 pages)

作者 Steve Oualline ,265頁

C Elements of Style is a useful guide which covers the principals of good programming style, teaching C and C++ programmers how to write code that can be easily read, understood, and maintained by others. Whether you are a student or professional programmer, you will benefit from the many tips and techniques for constructing elegant, reliable code.

這是一本十分有用的涵編程風格指南兼贸,指導c和c++程序員如何去編寫可讀性良好的驹针,易懂的如叼,易于維護的程序。不論你是一個學生還是專業(yè)程序員妻熊,你都能從這本書中提供的技巧和技術中獲益,構(gòu)建優(yōu)雅可靠的代碼仑最。

The book attempts to show readers how to build a good programming style into your code. Since computer reads only the code and the human concentrates on the comments, a good programming style pertains to both parts of a program.

這本書意在向讀者們展示如何在你的程序中融入風格良好的代碼扔役。機器僅處理代碼,而人類關注于注釋警医。良好的編程風格與這兩部分都有關亿胸。

The ultimate goal is to build a well-designed, well-written code which not only make an effective use of the computer and but also contains careful constructed comments to help humans understand it. This condition will ease the debugging, maintenance and enhancement process, which will eventually improve the readability, portability, reliability and maintainability of your code.

我們的最終目標是構(gòu)建設計良好坯钦,編寫良好的代碼,這種代碼對于計算機來說是高效的侈玄,同時包含了精心編寫的注釋用于幫助人類理解程序婉刀。這樣一來,調(diào)試拗馒,維護和增強程序路星,都變得更加容易了。最終還提升了代碼的可讀性诱桂,簡潔性洋丐,可靠性和可維護性。

Inside, you will find guidelines on writing comments, program heading, determining variable names, statement formatting, statement details, writing preprocessor, organizing directories and creating makefile.

在本書中挥等,你可以找到有關編寫注釋友绝,程序頭,變量命名肝劲,語句格式化迁客,語句細節(jié),編寫預處理器命令辞槐,組織目錄和創(chuàng)建makefile的指南掷漱。

This book is published under the Creative Commons License.

本書通過知識共享協(xié)議發(fā)布。

Build Your Own Lisp

《編寫你自己的Lisp語言》(Build Your Own Lisp

By Daniel Holden (212 pages)

作者 Daniel Holden 榄檬,212頁

Learn the C programming language and at the same time learn how to build your very own programming language, a minimal Lisp, in under 1000 lines of code.

在學習C語言的同時學習如何創(chuàng)造你自己的編程語言——一個最簡的Lisp語言(僅用不到1000行代碼)卜范。

This book is for anyone wanting to learn C, or who has once wondered how to build their own programming language. It is not designed as a first programming language book, as you need some programming experience to make your way through the content.

這本書是為兩種人寫的,一種是想要學習c語言的人鹿榜,另一種是想要知道如何創(chuàng)建一門語言的人海雪。本書并不適合作為第一本入門書籍,因為你需要一些編程經(jīng)驗才能讀懂它的內(nèi)容舱殿。

Build Your Own Lisp is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0.

本書基于Creative Commons Attribution-NonCommercial-ShareAlike 3.0.協(xié)議發(fā)布

A paperback is available to purchase from Amazon.

紙質(zhì)版可以在Amazon上購買奥裸。

The GNU C Reference Manual

《 GNU C語言參考手冊》(The GNU C Reference Manual

By Trevis Rothwell, James Youngman (91 pages)

作者 Trevis Rothwell, James Youngman ,91頁

The GNU C Reference Manual is a reference for the C programming language and aims to document the 1989 ANSI C standard, the 1999 ISO C standard, and the current state of GNU extensions to standard C. It is not designed for new programmers.

本書是一本C語言參考手冊沪袭,意在寫明C89湾宙,C99標準以及當前GNU對標準c語言的擴展情況。本書并不適合新手閱讀冈绊。

Chapters cover:

包含以下章節(jié):

  • Lexical Elements – describes the lexical elements that make up C source code after preprocessing. These elements are called tokens. There are five types of tokens: keywords, identifiers, constants, operators, and separators

  • 詞法元素——這部分內(nèi)容描述了預編譯之后创倔,組成 C 語言代碼的詞法元素。包括5種:關鍵字焚碌,標識符畦攘,常量,操作符和分隔符

  • Data Types – examines primitive data types, enumerations, unions, structures, arrays, pointers, incomplete types, type qualifiers, storage class specifiers, and renaming types

  • 數(shù)據(jù)類型——研究基礎的數(shù)據(jù)類型十电,枚舉知押,聯(lián)合體叹螟,結(jié)構(gòu)體,數(shù)組台盯,指針罢绽,不完全類型,類型修飾詞静盅,儲存類型修飾詞以及重命名類型

  • Expressions and Operators – also looks at incrementing / decrementing, arithmetic operators, complex conjugation, comparison operators, logical operators, bit shifting, bitwise local operators, pointer operators, the sizeof operator, type casts, and more

  • 表達式和操作符 —— 還介紹了自增/自減良价,算數(shù)操作符,復共軛性蒿叠,比較操作符明垢,邏輯運算符,位移市咽,位運算符痊银,指針運算符,sizeof施绎,類型轉(zhuǎn)換等等溯革。

  • Statements – read about labels, expression statements, the if statement, the switch statement, the while statement, the do statement, the for statement, blocks, the null statement, the goto statement, the break statement, the continue statement, the return statement, and the typedef statement

  • 語句 —— 標簽,表達式谷醉,if 語句致稀,switch 語句,while 語句俱尼,do 語句抖单,for 語句,代碼塊号显,null 語句臭猜,goto 語句躺酒,break 語句押蚤,continue 語句,return 語句以及 typedef 語句

  • Functions – learn about function declarations, function definitions, calling functions, function parameters, variable length parameter lists, calling functions through function pointers, the main function, recursive functions, and more

  • 函數(shù) —— 學習函數(shù)聲明羹应,函數(shù)定義揽碘,函數(shù)調(diào)用,參數(shù)园匹,邊長參數(shù)列表雳刺,通過指針調(diào)用函數(shù),main 函數(shù)裸违,遞歸函數(shù)等等掖桦。

  • Program Structure and Scope – looks at the big picture

  • 程序結(jié)構(gòu)和定義域 —— 從宏觀上來看程序

  • A Sample Program – a complete program written in C, consisting of both a C source file and a header file. This program is an expanded version of the quintessential “hello world” program, and serves as an example of how to format and structure C code for use in programs for FSF Project GNU

  • 一個例程 —— 一個用 C 語言編寫的完整程序,包含 C 語言源文件和頭文件供汛。這個程序是一個典型“hello world”程序的擴展版枪汪,它向我們展示了在 GNU FSF 項目中 C 語言是如何工作的涌穆。

The book is available under the terms of the GNU Free Documentation License, Version 1.3 or later.

本書基于GNU Free Documentation License Version 1.3 及其更新版本發(fā)布。

The GNU C Programming Tutorial

《GNU C 語言編程教程》(The GNU C Programming Tutorial

By Mark Burgess, Ron Hale-Evans (290 pages)

作者 Mark Burgess, Ron Hale-Evans 雀久,290頁

The GNU C Programming Tutorial introduces the reader to the basic ideas in a logical order. It offers detailed coverage of each of the main elements of the C language and how to program in C, with special emphasis on the GNU/Linux compiler and associated software.

本書以邏輯順序向讀者介紹了 C 語言的基本內(nèi)容宿稀。本書內(nèi)容涵蓋了 C 語言的全部主要內(nèi)容的細節(jié)以及如何使用 C 語言編程,特別強調(diào)了GNU/Linux編譯器以及相關軟件赖捌。

There are chapters devoted to functions, variables and declarations, scope, expressions and operators, parameters, pointers, decisions, loops, arrays, strings, input and output, and much more.

一些章節(jié)主要介紹了函數(shù)祝沸,變量以及聲明,作用域越庇,表達式和操作符罩锐,參數(shù),指針悦荒,判定唯欣,循環(huán),數(shù)組搬味,字符串境氢,輸入輸出等等。

The GNU C Programming Tutorial is released under the GNU Free Documentation License, Version 1.1.

本書基于GNU Free Documentation 協(xié)議 Version 1.1版發(fā)布碰纬。

Essential C

《C語言基礎》(Essential C

By Nick Parlante (45 pages)

作者 Nick Parlante 萍聊,45頁

This Stanford CS Education is a fairly brief document which explains all the common features and techniques for C. The coverage is pretty quick, so it is targeted at a programmer with a background in another language.

這份簡短的文檔解釋了 C 語言全部的常用特性和技術。這份文檔十分簡潔悦析,因此它的目標人群是已經(jīng)具有其他編程語言背景的人寿桨。

Topics include variables, int types, floating point types, promotion, truncation, operators, control structures (if, while, for), functions, value parameters, reference parameters, structs, pointers, arrays, the pre-processor, and the standard C library functions.

內(nèi)容包括變量,整型强戴,浮點型亭螟,類型提升,截斷骑歹,操作符预烙,控制結(jié)構(gòu)(if,while,for),函數(shù)道媚,數(shù)值參數(shù)扁掸,引用參數(shù),結(jié)構(gòu)體最域,指針谴分,數(shù)組,預處理器以及 C 語言標準庫函數(shù)镀脂。

Table of Contents:

Introduction

Basic Types and Operators

Control Structures

Complex Data Types

Functions

Odds and Ends

Advanced Arrays and Pointers

Operators and Standard Library Reference

目錄:

  • 簡介

  • 基礎類型與運算符

  • 控制結(jié)構(gòu)

  • 復雜數(shù)據(jù)類型

  • 函數(shù)

  • 雜項

  • 高級數(shù)組與指針

  • 運算符和標準庫

The author’s description indicates this book is issued under an open-source like license.

根據(jù)作者的描述牺蹄,我們得知這是一本基于開源協(xié)議發(fā)布的書籍。

Beej’s Guide to C Programming

《Beej的C語言教程》(Beej’s Guide to C Programming

By Brian “Beej” Hall (130 pages)

作者 Brian “Beej” Hall 薄翅,130 pages

Beej’s Guide to C Programming tries to lead the reader from complete and utter sheer lost confusion on to the sort of enlightened bliss that can only be obtained though pure C programming.

本書試圖為那些心存困惑的讀者帶來一種僅能通過純粹c語言編程而產(chǎn)生的快感沙兰。

Chapters:

章節(jié):

  • Programming Building Blocks

  • 構(gòu)建程序的基本結(jié)構(gòu)塊

  • Variables, Expressions, and Statements – A variable is simply a name for a number. An expression in C consists of other expressions optionally put together with operators. Examines the if, while, do-while, and the for statements Building Blocks Revisited

  • 變量虑省,表達式和,語句僧凰。變量就是一個數(shù)字的名字探颈。

一個c語言表達式可以包含其他的表達式以及運算符。文章還介紹了if训措,while伪节,do while以及程序重復執(zhí)行的for語句。

  • Functions – put some of those building blocks in their own functions when they become too large, or when they do a different thing than the rest of the code

  • 函數(shù)绩鸣。當程序塊變得很大怀大,或是當這些程序塊用來執(zhí)行一些特定的工作時,我們會把它們封裝到函數(shù)中呀闻。

  • Variables, the Sequel – talks about variable scope and storage classes

  • 變量(續(xù)篇)化借。探討了變量的作用域和儲存類型

  • Pointers – they are the address of data. Just like an int can be 12, a pointer can be the address of data

  • 指針。它們是數(shù)據(jù)在內(nèi)存中的地址捡多。就像一個整型的值可以是12蓖康,一個指針的值就是數(shù)據(jù)在內(nèi)存中的地址

  • Structures – a construct that allows you to logically group variables into groups. You can then reference the group as a whole

  • 結(jié)構(gòu)體。結(jié)構(gòu)體允許你將變量分組垒手。隨后你可以將其作為一個整體來使用蒜焊。

  • Arrays – a linear collection of related data

  • 數(shù)組。一組相關數(shù)據(jù)的線性集合

  • Strings – a string in C is a sequence of bytes in memory that usually contains a bunch of letters

  • 字符串科贬。c語言中的字符串就是內(nèi)存中的一組連續(xù)的比特泳梆,包含了一組字符

  • Dynamic Memory – explores the malloc(), free(), realloc(), and calloc() functions

  • 動態(tài)內(nèi)存。探討了malloc(), free(), realloc() 和 calloc() 函數(shù)

  • More Stuff – topics include pointer arithmetic, typedef, enum, struct declarations, command line arguments, multidimensional arrays, casting and promotion, incomplete types, void pointers, NULL pointers, and static keywords

  • 更多內(nèi)容榜掌。指針運算优妙,typedef,枚舉憎账,結(jié)構(gòu)體聲明套硼,命令行參數(shù),多維數(shù)組鼠哥,類型轉(zhuǎn)換和類型提升熟菲,不完整類型看政,void指針朴恳,NULL指針和static關鍵字

  • Standard I/O Library – used for reading from and writing to files

  • 標準輸入輸出庫。用來進行文件的讀寫允蚣。

  • String Manipulation – find functions for pulling substrings out of strings, concatenating strings together, getting the length of a string, and more

  • 字符串操作于颖。用來查找子串的函數(shù),連接字符串的函數(shù)嚷兔,獲取字符串長度的函數(shù)森渐,等等做入。

  • Mathematics – functions that will serve your general purpose mathematical needs

  • 一些可以滿足你基本算數(shù)需求的函數(shù)。

This book is licensed under the Creative Commons Attribution-Noncommercial- No Derivative Works 3.0 License.

本書基于Creative Commons Attribution-Noncommercial- No Derivative Works 3.0 協(xié)議發(fā)布同衣。

Modern C

《現(xiàn)代C語言》(Modern C

By Jens Gustedt (310 pages)

作者 Jens Gustedt 竟块,310頁

Modern C seeks to motivate the reader to climb to higher levels of knowledge. The book is divided into five levels:

本書鼓勵讀者逐級探索c語言的特性。內(nèi)容一共分為如下五個層級:

  • First level – provides the reader with the very basics of C programs, their purpose, their structure, and how to use them

  • 第一層——使讀者了解最基本的c語言程序耐齐。了解使用c語言的目的和數(shù)據(jù)結(jié)構(gòu)浪秘,以及如何去使用它們

  • Second level – details most principal concepts and features such as control structures, data types, operators and functions. It aims to provide the reader with a deeper understanding of the things that are going on with running programs

  • 第二層——詳細的說明了大部分主要概念以及特性,包括控制結(jié)構(gòu)埠况,數(shù)據(jù)類型操作符和函數(shù)耸携。這一級的主要目的是讓讀者能夠?qū)τ谶@些運行程序必備的知識,有更深刻的理解辕翰。

  • Third level – goes to the heart of the C language. It fully explains pointers, familiarizes you with C’s memory model, and allows you to understand most of C’s library interface.

  • 第三層——進入c語言的核心部分夺衍。詳細的解釋了指針,讓你熟悉c語言的內(nèi)存模型喜命,并且讓你了解大多數(shù)c語言庫的接口

  • Fourth level – goes into detail in specific topics, such as performance, reentrancy, atomicity, threads and type generic programming

  • 第四層——深入理解一些特定的主題沟沙。比如性能,重入壁榕,原子性尝胆,線程及泛型編程

  • Fifth level – discusses the author’s ideas for a future development of C

  • 第五層——探討了作者對這門語言未來發(fā)展趨勢的理解

This book is licensed under the Creative Commons Attribution-Noncommercial- No Derivative Works 3.0 License.

本書基于Creative Commons Attribution-Noncommercial- No Derivative Works 3.0 協(xié)議發(fā)布

An Introduction to GCC

《GCC簡介》(An Introduction to GCC

By Brian Gough (144 pages)

作者 Brian Gough ,144頁

An Introduction to GCC provides an introduction to the GNU C and C++ Compilers, gcc and g++, which are part of the GNU Compiler Collection (GCC).

本書介紹了 GNU C 語言和 C++編譯器——gcc 和 g++护桦,它們是 GNU 編譯器套裝(GCC)的一部分含衔。

This book explains how to use the compiler itself. Based on years of observation of questions posted on mailing lists, it guides the reader straight to the important options of GCC.

本書介紹了如何使用編譯器。通過多年以來對郵件列表中的問題的觀察二庵,本書帶領讀者直擊 GCC 的重要選項贪染。

Chapters:

章節(jié)介紹:

  • Compiling a C program – describes how to compile C programs using gcc. Programs can be compiled from a single source file or from multiple source files, and may use system libraries and header files

  • 編譯c程序。介紹了如何使用gcc來編譯c語言程序催享。單個文件或多個文件均可以編譯杭隙,也可以使用操作系統(tǒng)函數(shù)和頭文件。

  • Compilation options – describes other commonly-used compiler options available in GCC. These options control features such as the search paths used for locating libraries and include files, the use of additional warnings and diagnostics, preprocessor macros and C language dialects

  • 編譯選項因妙。介紹了gcc中一些常用的編譯選項痰憎。這些參數(shù)控制一些功能,例如搜索庫函數(shù)和頭文件的路徑攀涵,提供額外的編譯告警和診斷铣耘。預處理宏和c語言方言。

  • Using the preprocessor – describes the use of the GNU C preprocessor cpp, which is part of the GCC package. The preprocessor expands macros in source files before they are compiled. It is automatically called whenever GCC processes a C or C++ program

  • 使用預處理器以故。描述了cpp(GNU C preprocessor)的使用方法蜗细,cpp是GCC的一部分。預處理器會在編譯前將代碼中的宏展開,當GCC處理c或者c+代碼時炉媒,預處理器會自動被調(diào)用踪区。

  • Compiling for debugging – provides the -g debug option to store additional debugging information in object files and executables. This debugging information allows errors to be traced back from a specific machine instruction to the corresponding line in the original source file

  • 編譯帶有debug信息的程序。提供了一個-g選項用以在中間文件和可執(zhí)行文件中存儲額外的調(diào)試信息吊骤。這些調(diào)試信息使得我們可以追蹤錯誤缎岗,將機器指令中的問題定位到源代碼中。

  • Compiling with optimization – GCC is an optimizing compiler. It provides a wide range of options which aim to increase the speed, or reduce the size, of the executable files it generates

  • 優(yōu)化編譯白粉。GCC是一個優(yōu)化過的編譯器密强。它提供了很多選項,可以加速編譯或是減少編譯后文件的體積蜗元。

  • Compiling a C++ program – describes how to use GCC to compile programs written in C++, and the command-line options specific to that language

  • 編譯C++程序或渤。介紹了如何使用GCC編譯C++程序以及該語言可以使用的命令行選項。

  • Platform-specific options – describes some of the options available for common platforms: Intel and AMD x86 options, x86 extensions, x86 64-bit processors, DEC Alpha options, SPARC options, POWER/PowerPC options, Multi-architecture support, and floating-point issues

  • 平臺相關選項奕扣。介紹了一些常見平臺可以使用的選項

  • Troubleshooting – GCC provides several help and diagnostic options to help troubleshoot problems with the compilation process

  • 排錯薪鹦。GCC提供了一些幫助和診斷選項用于幫助我們定位編譯過程中出現(xiàn)的問題。

  • Compiler-related tools – describes a number of tools which are useful in combination with GCC. These include the GNU archiver ar, for creating libraries, and the GNU profiling and coverage testing programs, gprof and gcov

  • 編譯器相關工具惯豆。介紹了GCC編譯過程中會用到的一些有用的工具池磁。包括用來創(chuàng)建庫的 GNU 歸檔工具 ar,GNU 性能和覆蓋率測試程序gprofgcov

  • How the compiler works – describes in more detail how GCC transforms source files to an executable file. Compilation is a multi-stage process involving several tools, including the GNU Compiler itself (through the gcc or g++ frontends), the GNU Assembler as, and the GNU Linker ld. The complete set of tools used in the compilation process is referred to as a toolchain

  • 編譯器是如何工作的楷兽。詳細介紹了GCC是如何把源文件編譯為可執(zhí)行文件的地熄。編譯是一個多階段過程,涉及很多工具芯杀,包括GNU編譯器本身端考,GNU匯編器,以及GNU鏈接器揭厚。在編譯過程中使用的各種工具却特,我們統(tǒng)稱為編譯鏈。

  • Examining compiled files – describes several useful tools for examining the contents of executable files and object files

  • 檢查編譯后的文件筛圆。介紹了一些用來檢查可執(zhí)行文件和obj文件內(nèi)容的工具裂明。

  • Common error messages – describes the most frequent error and warning messages produced by gcc and g++. Each case is accompanied by a description of the causes, an example and suggestions of possible solutions

  • 常見錯誤信息。介紹了gcc和g++產(chǎn)生的最常見的錯誤和告警信息太援。每種情況都帶有原因分析闽晦,樣例以及建議的解決辦法。

  • Getting help – if readers encounters a problem not covered by this introduction, there are several reference manuals which describe GCC and language-related topics in more detail

  • 獲取幫助提岔。如果讀者遇到了書中沒有提到的問題仙蛉,還有很多介紹GCC和語言的手冊可以參考。

This book is published under the GNU Free Documentation License

本書基于GNU Free Documentation協(xié)議發(fā)布


Here are some informative C Books to download without charge, but which regrettably are not released under an open source license, or where license information is unclear. In no particular order:

很多c語言書籍都可以免費下載唧垦,但是可惜的是它們并沒有以開源協(xié)議來發(fā)布捅儒,或其基于何種協(xié)議并沒有明確說明液样。以下對其進行介紹振亮,排名不分先后:

  • 《C編程導論》 Introduction to C Programming – 作者 Rob Miles

  • 《新標準C語言》The New Standard C: An Economic and Cultural Commentary – 作者 Derek M. Jones

  • 《使用標準C語言進行面向?qū)ο缶幊獭?em>Object-Oriented Programming with ANSI-C – 作者 Axel-Tobias Schreiner

  • 《編寫零缺陷的C語言代碼》Writing Bug-Free C Code – 作者 Jerry Jongenius

And finally, my recommendation if you want to buy a canonical reference book is this title: The C Programming Language. Terse, not for beginners, but widely regarded as the classic C programming book.

最后巧还,如果你想買一本權(quán)威參考書,請認準《C程序設計語言》(The C Programming Language)坊秸。這本書非常簡練麸祷,不適合新手,但是被廣泛認為是一部經(jīng)典褒搔。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末阶牍,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子星瘾,更是在濱河造成了極大的恐慌走孽,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,602評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件琳状,死亡現(xiàn)場離奇詭異磕瓷,居然都是意外死亡,警方通過查閱死者的電腦和手機念逞,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,442評論 2 382
  • 文/潘曉璐 我一進店門困食,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人翎承,你說我怎么就攤上這事硕盹。” “怎么了叨咖?”我有些...
    開封第一講書人閱讀 152,878評論 0 344
  • 文/不壞的土叔 我叫張陵瘩例,是天一觀的道長。 經(jīng)常有香客問我甸各,道長仰剿,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 55,306評論 1 279
  • 正文 為了忘掉前任痴晦,我火速辦了婚禮南吮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘誊酌。我一直安慰自己部凑,他們只是感情好,可當我...
    茶點故事閱讀 64,330評論 5 373
  • 文/花漫 我一把揭開白布碧浊。 她就那樣靜靜地躺著涂邀,像睡著了一般。 火紅的嫁衣襯著肌膚如雪箱锐。 梳的紋絲不亂的頭發(fā)上比勉,一...
    開封第一講書人閱讀 49,071評論 1 285
  • 那天,我揣著相機與錄音,去河邊找鬼浩聋。 笑死观蜗,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的衣洁。 我是一名探鬼主播墓捻,決...
    沈念sama閱讀 38,382評論 3 400
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼坊夫!你這毒婦竟也來了砖第?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 37,006評論 0 259
  • 序言:老撾萬榮一對情侶失蹤环凿,失蹤者是張志新(化名)和其女友劉穎梧兼,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體智听,經(jīng)...
    沈念sama閱讀 43,512評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡袱院,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 35,965評論 2 325
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了瞭稼。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片忽洛。...
    茶點故事閱讀 38,094評論 1 333
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖环肘,靈堂內(nèi)的尸體忽然破棺而出欲虚,到底是詐尸還是另有隱情,我是刑警寧澤悔雹,帶...
    沈念sama閱讀 33,732評論 4 323
  • 正文 年R本政府宣布复哆,位于F島的核電站,受9級特大地震影響腌零,放射性物質(zhì)發(fā)生泄漏梯找。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 39,283評論 3 307
  • 文/蒙蒙 一益涧、第九天 我趴在偏房一處隱蔽的房頂上張望锈锤。 院中可真熱鬧,春花似錦闲询、人聲如沸久免。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,286評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽阎姥。三九已至,卻和暖如春鸽捻,著一層夾襖步出監(jiān)牢的瞬間呼巴,已是汗流浹背泽腮。 一陣腳步聲響...
    開封第一講書人閱讀 31,512評論 1 262
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留衣赶,地道東北人诊赊。 一個月前我還...
    沈念sama閱讀 45,536評論 2 354
  • 正文 我出身青樓,卻偏偏與公主長得像屑埋,于是被迫代替她去往敵國和親豪筝。 傳聞我的和親對象是個殘疾皇子痰滋,可洞房花燭夜當晚...
    茶點故事閱讀 42,828評論 2 345

推薦閱讀更多精彩內(nèi)容