gogogo
Syndetics cover image
Image from Syndetics

Programming in C / Stephen G. Kochan.

By: Material type: TextTextSeries: Developer's libraryPublisher: Upper Saddle River, NJ : Addison-Wesley, 2015Copyright date: ©2015Edition: Fourth editionDescription: xv, 525 pages : illustrations ; 23 cmISBN:
  • 9780321776419 (pbk.)
  • 0321776410 (pbk.)
Subject(s): DDC classification:
  • 005.133 KOC 23
Holdings
Item type Current library Call number Status Date due Barcode
Standard Loan Moylish Library Main Collection 005.133 KOC (Browse shelf(Opens below)) Available 39002100635730

Enhanced descriptions from Syndetics:

Programming in C will teach you how to write programs in the C programming language. Whether you're a novice or experienced programmer, this book will provide you with a clear understanding of this language, which is the foundation for many object-oriented programming languages such as C++, Objective-C, C#, and Java.

This book teaches C by example, with complete C programs used to illustrate each new concept along the way. Stephen Kochan provides step-by-step explanations for all C functions. You will learn both the language fundamentals and good programming practices. Exercises at the end of each chapter make the book ideally suited for classroom use or for self-instruction.

All the features of the C language are covered in this book, including the latest additions added with the C11 standard. Appendixes provide a detailed summary of the language and the standard C library, both organized for quick reference.

"Absolutely the best book for anyone starting out programming in C. This is an excellent introductory text with frequent examples and good text....This is the book I used to learn C-it's a great book."

-Vinit S. Carpenter, Learn C/C++ Today

Includes bibliographical references and index.

Table of contents provided by Syndetics

  • Introduction (p. 1)
  • 1 Some Fundamentals (p. 5)
  • Programming (p. 5)
  • Higher-Level Languages (p. 5)
  • Operating Systems (p. 6)
  • Compiling Programs (p. 7)
  • Integrated Development Environments (p. 10)
  • Language Interpreters (p. 10)
  • 2 Compiling and Running Your First Program (p. 11)
  • Compiling Your Program (p. 12)
  • Running Your Program (p. 12)
  • Understanding Your First Program (p. 13)
  • Displaying the Values of Variables (p. 15)
  • Comments (p. 17)
  • Exercises (p. 19)
  • 3 Variables, Data Types, and Arithmetic Expressions (p. 21)
  • Understanding Data Types and Constants (p. 21)
  • The Integer Type int (p. 22)
  • The Floating Number Type float (p. 23)
  • The Extended Precision Type double (p. 23)
  • The Single Character Type char (p. 24)
  • The Boolean Data Type _Bool (p. 24)
  • Type Specifiers: long, long long, short, unsigned, and signed (p. 26)
  • Working with Variables (p. 29)
  • Working with Arithmetic Expressions (p. 30)
  • Integer Arithmetic and the Unary Minus Operator (p. 33)
  • Combining Operations with Assignment: the Assignment Operators (p. 39)
  • Types _Complex and _Imaginary (p. 40)
  • Exercises (p. 40)
  • 4 Program Looping (p. 43)
  • Triangular Numbers (p. 43)
  • The for Statement (p. 44)
  • Relational Operators (p. 46)
  • Aligning Output (p. 50)
  • Program Input (p. 51)
  • Nested for Loops (p. 53)
  • For Loop Variants (p. 55)
  • The while Statement (p. 56)
  • The do Statement (p. 60)
  • The break Statement (p. 62)
  • The continue Statement (p. 62)
  • Exercises (p. 63)
  • 5 Making Decisions (p. 65)
  • The if Statement (p. 65)
  • The if-else Construct (p. 69)
  • Compound Relational Tests (p. 72)
  • Nested if Statements (p. 74)
  • The else if Construct (p. 76)
  • The switch Statement (p. 83)
  • Boolean Variables (p. 86)
  • The Conditional Operator (p. 90)
  • Exercises (p. 92)
  • 6 Working with Arrays (p. 95)
  • Defining an Array (p. 96)
  • Using Array Elements as Counters (p. 100)
  • Generating Fibonacci Numbers (p. 103)
  • Using an Array to Generate Prime Numbers (p. 104)
  • Initializing Arrays (p. 106)
  • Character Arrays (p. 108)
  • Base Conversion Using Arrays (p. 109)
  • The const Qualifier (p. 111)
  • Multidimensional Arrays (p. 113)
  • Variable Length Arrays (p. 115)
  • Exercises (p. 117)
  • 7 Working with Functions (p. 119)
  • Defining a Function (p. 119)
  • Arguments and Local Variables (p. 123)
  • Function Prototype Declaration (p. 124)
  • Automatic Local Variables (p. 124)
  • Returning Function Results (p. 126)
  • Functions Calling Functions Calling... (p. 130)
  • Declaring Return Types and Argument Types (p. 133)
  • Checking Function Arguments (p. 135)
  • Top-Down Programming (p. 137)
  • Functions and Arrays (p. 137)
  • Assignment Operators (p. 141)
  • Sorting Arrays (p. 143)
  • Multidimensional Arrays (p. 146)
  • Global Variables (p. 151)
  • Automatic and Static Variables (p. 155)
  • Recursive Functions (p. 158)
  • Exercises (p. 161)
  • 8 Working with Structures (p. 163)
  • The Basics of Structures (p. 163)
  • A Structure for Storing the Date (p. 164)
  • Using Structures in Expressions (p. 166)
  • Functions and Structures (p. 169)
  • A Structure for Storing the Time (p. 175)
  • Initializing Structures (p. 178)
  • Compound Literals (p. 178)
  • Arrays of Structures (p. 180)
  • Structures Containing Structures (p. 183)
  • Structures Containing Arrays (p. 185)
  • Structure Variants (p. 189)
  • Exercises (p. 190)
  • 9 Character Strings (p. 193)
  • Revisiting the Basics of Strings (p. 193)
  • Arrays of Characters (p. 194)
  • Variable-Length Character Strings (p. 197)
  • Initializing and Displaying Character Strings (p. 199)
  • Testing Two Character Strings for Equality (p. 202)
  • Inputting Character Strings (p. 204)
  • Single-Character Input (p. 206)
  • The Null String (p. 211)
  • Escape Characters (p. 215)
  • More on Constant Strings (p. 217)
  • Character Strings, Structures, and Arrays (p. 218)
  • A Better Search Method (p. 221)
  • Character Operations (p. 226)
  • Exercises (p. 229)
  • 10 Pointers (p. 233)
  • Pointers and Indirection (p. 233)
  • Defining a Pointer Variable (p. 234)
  • Using Pointers in Expressions (p. 237)
  • Working with Pointers and Structures (p. 239)
  • Structures Containing Pointers (p. 241)
  • Linked Lists (p. 243)
  • The Keyword const and Pointers (p. 251)
  • Pointers and Functions (p. 252)
  • Pointers and Arrays (p. 258)
  • A Slight Digression About Program Optimization (p. 262)
  • Is It an Array or Is It a Pointer? (p. 262)
  • Pointers to Character Strings (p. 264)
  • Constant Character Strings and Pointers (p. 266)
  • The Increment and Decrement Operators Revisited (p. 267)
  • Operations on Pointers (p. 271)
  • Pointers to Functions (p. 272)
  • Pointers and Memory Addresses (p. 273)
  • Exercises (p. 275)
  • 11 Operations on Bits (p. 277)
  • The Basics of Bits (p. 277)
  • Bit Operators (p. 278)
  • The Bitwise and Operator (p. 279)
  • The Bitwise Inclusive-OR Operator (p. 281)
  • The Bitwise Exclusive-OR Operator (p. 282)
  • The Ones Complement Operator (p. 283)
  • The Left Shift Operator (p. 285)
  • The Right Shift Operator (p. 286)
  • A Shift Function (p. 286)
  • Rotating Bits (p. 288)
  • Bit Fields (p. 291)
  • Exercises (p. 295)
  • 12 The Preprocessor (p. 297)
  • The #define Statement (p. 297)
  • Program Extendability (p. 301)
  • Program Portability (p. 302)
  • More Advanced Types of Definitions (p. 304)
  • The # Operator (p. 309)
  • The ## Operator (p. 310)
  • The #include Statement (p. 311)
  • System Include Files (p. 313)
  • Conditional Compilation (p. 314)
  • The #ifdef, #endif, #else, and #ifndef Statements (p. 314)
  • The #if and #elif Preprocessor Statements (p. 316)
  • The #undef Statement (p. 317)
  • Exercises (p. 318)
  • 13 Extending Data Types with the Enumerated Data Type, Type Definitions, and Data Type Conversions (p. 319)
  • Enumerated Data Types (p. 319)
  • The typedef Statement (p. 323)
  • Data Type Conversions (p. 325)
  • Sign Extension (p. 327)
  • Argument Conversion (p. 328)
  • Exercises (p. 329)
  • 14 Working with Larger Programs (p. 331)
  • Dividing Your Program into Multiple Files (p. 331)
  • Compiling Multiple Source Files from the Command Line (p. 332)
  • Communication Between Modules (p. 334)
  • External Variables (p. 334)
  • Static Versus Extern Variables and Functions (p. 337)
  • Using Header Files Effectively (p. 339)
  • Other Utilities for Working with Larger Programs (p. 341)
  • The make Utility (p. 341)
  • The cvs Utility (p. 343)
  • Unix Utilities: ar, grep, sed, and so on (p. 343)
  • 15 Input and Output Operations in C (p. 345)
  • Character I/O: getchar() and putchar() (p. 346)
  • Formatted I/O: printf() and scanf() (p. 346)
  • The printf() Function (p. 346)
  • The scanf() Function (p. 353)
  • Input and Output Operations with Files (p. 358)
  • Redirecting I/O to a File (p. 358)
  • End of File (p. 361)
  • Special Functions for Working with Files (p. 362)
  • The fopen Function (p. 362)
  • The getc() and putc() Functions (p. 364)
  • The fclose() Function (p. 365)
  • The feof Function (p. 367)
  • The fprintf() and fscanf() Functions (p. 367)
  • The fgets() and fputs() Functions (p. 367)
  • Stdin, stdout, and stderr (p. 368)
  • The exit() Function (p. 369)
  • Renaming and Removing Files (p. 370)
  • Exercises (p. 371)
  • 16 Miscellaneous and Advanced Features (p. 373)
  • Miscellaneous Language Statements (p. 373)
  • The goto Statement (p. 373)
  • The null Statement (p. 374)
  • Working with Unions (p. 375)
  • The Comma Operator (p. 378)
  • Type Qualifiers (p. 379)
  • The register Qualifier (p. 379)
  • The volatile Qualifier (p. 379)
  • The restrict Qualifier (p. 379)
  • Command-line Arguments (p. 380)
  • Dynamic Memory Allocation (p. 384)
  • The calloc() and malloc() Functions (p. 385)
  • The sizeof Operator (p. 385)
  • The free Function (p. 387)
  • Exercises (p. 389)
  • 17 Debugging Programs (p. 391)
  • Debugging with the Preprocessor (p. 391)
  • Debugging Programs with gdb (p. 397)
  • Working with Variables (p. 400)
  • Source File Display (p. 401)
  • Controlling Program Execution (p. 402)
  • Getting a Stack Trace (p. 406)
  • Calling Functions and Setting Arrays and Structures (p. 407)
  • Getting Help with gdb Commands (p. 408)
  • Odds and Ends (p. 410)
  • 18 Object-Oriented Programming (p. 413)
  • What Is an Object Anyway? (p. 413)
  • Instances and Methods (p. 414)
  • Writing a C Program to Work with Fractions (p. 416)
  • Defining an Objective-C Class to Work with Fractions (p. 417)
  • Defining a C++ Class to Work with Fractions (p. 421)
  • Defining a C# Class to Work with Fractions (p. 424)
  • A C Language Summary (p. 427)
  • B The Standard C Library (p. 471)
  • C Compiling Programs with gcc (p. 495)
  • D Common Programming Mistakes (p. 499)
  • E Resources (p. 505)

Author notes provided by Syndetics

Stephen G. Kochan has been developing software with the C programming language for more than 30 years. He is the author of several best-selling titles on the C language, including Programming in C , Programming in Objective-C , and Topics in C Programming . He has also written extensively on Unix and is the author or coauthor of Exploring the Unix System and Unix Shell Programming .

Powered by Koha