楼主: 牛尾巴
10419 103

【2015新书】C in a Nutshell: The Definitive Reference(2nd)   [推广有奖]

泰斗

38%

还不是VIP/贵宾

-

TA的文库  其他...

最新e书

2018新书

2017新书

威望
8
论坛币
628843 个
通用积分
56891.9793
学术水平
12683 点
热心指数
12959 点
信用等级
12448 点
经验
568600 点
帖子
9173
精华
66
在线时间
13140 小时
注册时间
2008-2-13
最后登录
2024-4-26

特级学术勋章 特级热心勋章 特级信用勋章 高级学术勋章 高级热心勋章 高级信用勋章

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
图书名称:C in a Nutshell: The Definitive Reference(2nd)
作者:
Peter Prinz, Tony Crawford
出版社:
O'Reilly
页数:824
出版时间:December
2015                           
语言:English

格式:epub
内容简介:
The new edition of this classic O’Reilly reference provides clear, detailed explanations of every feature in the C language and runtime library, including multithreading, type-generic macros, and library functions that are new in the 2011 C standard (C11). If you want to understand the effects of an unfamiliar function, and how the standard library requires it to behave, you’ll find it here, along with a typical example.
Ideal for experienced C and C++ programmers, this book also includes popular tools in the GNU software collection. You’ll learn how to build C programs with GNU Make, compile executable programs from C source code, and test and debug your programs with the GNU debugger.
In three sections, this authoritative book covers:
  • C language concepts and language elements, with separate chapters on types, statements, pointers, memory management, I/O, and more
  • The C standard library, including an overview of standard headers and a detailed function reference
  • Basic C programming tools in the GNU software collection, with instructions on how use them with the Eclipse IDE


回复免费:

本帖隐藏的内容

C in a Nutshell The Definitive Reference(2nd).rar (1.5 MB) 本附件包括:
  • C in a Nutshell The Definitive Reference(2nd).epub






二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Definitive Reference nutshell erence Shell English 出版社 Peter

回帖推荐

ekscheng 发表于7楼  查看完整内容

C in a Nutshell 1st Edition**** 本内容被作者隐藏 ****
已有 8 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
nuomin + 100 + 20 奖励积极上传好的资料
happy_287422301 + 100 + 3 精彩帖子
aclyang + 20 精彩帖子
断想钩沉 + 1 + 1 + 1 精彩帖子
2010517155lpq + 50 精彩帖子
np84 + 100 精彩帖子
kychan + 100 + 5 + 5 + 5 精彩帖子
Nicolle + 100 + 100 + 1 + 1 + 1 精彩帖子

总评分: 经验 + 450  论坛币 + 240  学术水平 + 7  热心指数 + 10  信用等级 + 7   查看全部评分

本帖被以下文库推荐

沙发
Jealy 在职认证  发表于 2015-12-19 20:07:41 |只看作者 |坛友微信交流群
  1. Example 8-1. Function strcat()
  2. // The function strcat() appends a copy of the second string
  3. // to the end of the first string.
  4. // Arguments:    Pointers to the two strings.
  5. // Return value: A pointer to the first string, now concatenated with the second.

  6. char *strcat( char * restrict s1, const char * restrict s2 )
  7. {
  8.   char *rtnPtr = s1;
  9.   while ( *s1 != '\0' )                // Find the end of string s1.
  10.     ++s1;
  11.   while (( *s1++ = *s2++ ) != '\0' )   // The first character from s2 replaces
  12.     ;                                  // the terminator of s1.
  13.   return rtnPtr;
  14. }
复制代码


已有 3 人评分经验 论坛币 收起 理由
happy_287422301 + 100 精彩帖子
2010517155lpq + 2 精彩帖子
Nicolle + 20 鼓励积极发帖讨论

总评分: 经验 + 2  论坛币 + 120   查看全部评分

使用道具

藤椅
hjtoh 发表于 2015-12-19 20:10:50 来自手机 |只看作者 |坛友微信交流群
  1. Example 8-2. Functions printRow() and printMatrix()
  2. // Print one "row" array.
  3. void printRow( const ROW_t pRow )
  4. {
  5.   for ( int c = 0; c < NCOLS; ++c )
  6.     printf( "%6.2f", pRow[c] );
  7.   putchar( '\n' );
  8. }

  9. // Print the whole matrix.
  10. void printMatrix( const ROW_t *pMat, int nRows )
  11. {
  12.   for ( int r = 0; r < nRows; ++r )
  13.     printRow( pMat[r] );              // Print each row.
  14. }
  15. The parameters pRow and pMat are declared as pointers to const arrays because the functions do not modify the matrix. Because the number of rows is variable, it is passed to the function printMatrix() as a second argument.
  16. The following code fragment defines and initializes an array of rows with type ROW_t, and then calls the function printMatrix():
  17. ROW_t mat[ ] = { { 0.0F, 0.1F },
  18.                 { 1.0F, 1.1F, 1.2F },
  19.                 { 2.0F, 2.1F, 2.2F, 2.3F } };
  20. int nRows = sizeof(mat) / sizeof(ROW_t);
  21. printMatrix( mat, nRows );
复制代码

已有 3 人评分经验 论坛币 收起 理由
happy_287422301 + 100 精彩帖子
2010517155lpq + 2 精彩帖子
Nicolle + 20 鼓励积极发帖讨论

总评分: 经验 + 2  论坛币 + 120   查看全部评分

使用道具

板凳
soccy 发表于 2015-12-19 20:16:25 |只看作者 |坛友微信交流群
  1. Null Pointers
  2. A null pointer is what results when you convert a null pointer constant to a pointer type. A null pointer constant is an integer constant expression with the value 0, or such an expression cast as the type void * (see "Null Pointer Constants" in Chapter 4). The macro NULL is defined in stdlib.h, stdio.h and other header files as a null pointer constant.
  3. A null pointer is always unequal to any valid pointer to an object or function. For this reason, functions that return a pointer type usually use a null pointer to indicate a failure condition. One example is the standard function fopen(), which returns a null pointer if it fails to open a file in the specified mode:
  4. #include <stdio.h>
  5. /* ... */
  6. FILE *fp = fopen( "demo.txt", "r" );
  7. if ( fp == NULL )
  8. {
  9.   // Error: unable to open the file demo.txt for reading.
  10. }
  11. Null pointers are implicitly converted to other pointer types as necessary for assignment operations, or for comparisons using == or !=. Hence no cast operator is necessary in the previous example. (See also "Implicit Pointer Conversions" in Chapter 4.)
复制代码

已有 2 人评分论坛币 收起 理由
happy_287422301 + 100 精彩帖子
Nicolle + 20 鼓励积极发帖讨论

总评分: 论坛币 + 120   查看全部评分

使用道具

报纸
life_life 发表于 2015-12-19 20:38:36 |只看作者 |坛友微信交流群
  1. void Pointers
  2. A pointer to void, or void pointer for short, is a pointer with the type void *. As there are no objects with the type void, the type void * is used as the all-purpose pointer type. In other words, a void pointer can represent the address of any object—but not its type. To access an object in memory, you must always convert a void pointer into an appropriate object pointer.
  3. To declare a function that can be called with different types of pointer arguments, you can declare the appropriate parameters as pointers to void. When you call such a function, the compiler implicitly converts an object pointer argument into a void pointer. A common example is the standard function memset(), which is declared in the header file string.h with the following prototype:
  4. void *memset( void *s, int c, size_t n );
  5. The function memset() assigns the value of c to each of the n bytes of memory in the block beginning at the address s. For example, the following function call assigns the value 0 to each byte in the structure variable record:
  6. struct Data { /* ... */ } record;
  7. memset( &record, 0, sizeof(record) );
  8. The argument &record has the type struct Data *. In the function call, the argument is converted to the parameter’s type, void *.
  9. The compiler likewise converts void pointers into object pointers where necessary. For example, in the following statement, the malloc() function returns a void pointer whose value is the address of the allocated memory block. The assignment operation converts the void pointer into a pointer to int:
  10. int *iPtr = malloc( 1000 * sizeof(int) );
复制代码

已有 1 人评分论坛币 收起 理由
happy_287422301 + 100 鼓励积极发帖讨论

总评分: 论坛币 + 100   查看全部评分

使用道具

地板
mengyong 发表于 2015-12-19 21:03:59 |只看作者 |坛友微信交流群
  1. Initializing Pointers
  2. Pointer variables with automatic storage duration start with an undefined value, unless their declaration contains an explicit initializer. All variables defined within any block, without the storage class specifier static, have automatic storage duration. All other pointers defined without an initializer have the initial value of a null pointer.
  3. You can initialize a pointer with the following kinds of initializers:
  4. A null pointer constant.
  5. A pointer to the same type, or to a less qualified version of the same type (see the section "Pointers and Type Qualifiers,” later in this chapter).
  6. A void pointer, if the pointer being initialized is not a function pointer. Here again, the pointer being initialized can be a pointer to a more qualified type.
  7. Pointers that do not have automatic storage duration must be initialized with a constant expression, such as the result of an address operation or the name of an array or function.
  8. When you initialize a pointer, no implicit type conversion takes place except in the cases just listed. However, you can explicitly convert a pointer value to another pointer type. For example, to read any object byte by byte, you can convert its address into a char pointer to the first byte of the object:
  9. double x = 1.5;
  10. char *cPtr = &x;          // Error: type mismatch; no implicit conversion.
  11. char *cPtr = (char *)&x;  // OK: cPtr points to the first byte of x.
复制代码

已有 1 人评分论坛币 收起 理由
happy_287422301 + 100 鼓励积极发帖讨论

总评分: 论坛币 + 100   查看全部评分

使用道具

7
ekscheng 发表于 2015-12-19 22:18:38 |只看作者 |坛友微信交流群
C in a Nutshell 1st Edition

本帖隐藏的内容

C in a Nutshell.zip (6.18 MB) 本附件包括:
  • C in a Nutshell.pdf




已有 2 人评分经验 论坛币 收起 理由
Nicolle + 100 + 100 精彩帖子
happy_287422301 + 100 精彩帖子

总评分: 经验 + 100  论坛币 + 200   查看全部评分

使用道具

8
kuayueriguang 发表于 2015-12-19 22:57:45 |只看作者 |坛友微信交流群
谢谢。。。。。。。。。。。。。。。。。。。。。。。。。。。。
已有 1 人评分论坛币 收起 理由
Nicolle + 20 鼓励积极发帖讨论

总评分: 论坛币 + 20   查看全部评分

使用道具

9
mike68097 发表于 2015-12-20 00:45:45 |只看作者 |坛友微信交流群
已有 1 人评分论坛币 收起 理由
Nicolle + 20 鼓励积极发帖讨论

总评分: 论坛币 + 20   查看全部评分

使用道具

10
Nicolle 学生认证  发表于 2015-12-20 01:14:58 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 00:01