• Fri frakt över 249 kr
  • •
  • Snabba leveranser
  • •
  • Billiga böcker
Kundservice

Du är på sajten för privatpersoner.

Företag, bibliotek eller offentlig verksamhet?

Du handlar på classic.bokus.com, där alla dina funktioner finns intakta.
Till classic.bokus.com
Bokus logotyp. Gå till startsidan.
  • Erbjudanden
  • Nyheter
  • Student
  • Topplistor
  • Barn & ungdom
  • Bokus Play
  • E-böcker
  • Pocketböcker
  • Spel & pussel

10% rabatt på allt med kod NYSTART10 →

Sidfot

Mina sidor

    Hjälp

    • Kundservice
    • Vanliga frågor och svar
    • Frakt och leverans
    • Retur vid ångerrätt
    • Reklamera vara
    • Betalning
    • Köpvillkor
    • Allmänna villkor
    • Information om webbplatsens tillgänglighet

    Om Bokus

    • Om oss
    • Pressrum
    • För studenter
    • För företag
    • För bibliotek och offentlig verksamhet
    • För leverantörer
    • Hållbarhet

    Populärt

    • Aktuella erbjudanden
    • Presentkort
    • Studentlitteratur
    • Nya böcker
    • Topplistor
    • Signerade böcker
    • Engelska böcker

    Inspiration

    • Boktips
    • BookTok
    • Populära bokserier
    • Barnbokskaraktärer
    • Populära författare
    Logotyp för Bokus
    Följ oss på Facebook (extern länk)Följ oss på Instagram (extern länk)Följ oss på YouTube (extern länk)Följ oss på TikTok (extern länk)
    bokus @ CookiesAnpassa cookiesIntegritetspolicyKöpvillkor
    Till Citymail hemsida (extern länk)Till Budbee hemsida (extern länk)Till Postnord hemsida (extern länk)Till Schenker hemsida (extern länk)Till Early Bird hemsida (extern länk)Till Walleys hemsida (extern länk)
    1. Data och IT
    2. Programmeringsböcker

    C Primer Plus

    AvStephen Prata

    Häftad, Engelska, 2013

    Del i serien Developer's Library

    473 kr

    Beställningsvara. Skickas inom 7-10 vardagar. Fri frakt över 249 kr.

    Fler format och utgåvor

    E-bok

    655 kr

    E-bok

    762 kr

    Övrigt

    345 kr

    Beskrivning

    C Primer Plus is a carefully tested, well-crafted, and complete tutorial on a subject core to programmers and developers. This computer science classic teaches principles of programming, including structured code and top-down design.

    Author and educator Stephen Prata has created an introduction to C that is instructive, clear, and insightful. Fundamental programming concepts are explained along with details of the C language. Many short, practical examples illustrate just one or two concepts at a time, encouraging readers to master new topics by immediately putting them to use.

    Review questions and programming exercises at the end of each chapter bring out the most critical pieces of information and help readers understand and digest the most difficult concepts. A friendly and easy-to-use self-study guide, this book is appropriate for serious students of programming, as well as developers proficient in other languages with a desire to better understand the fundamentals of this core language.

    The sixth edition of this book has been updated and expanded to cover the latest developments in C as well as to take a detailed look at the new C11 standard. In C Primer Plus you’ll find depth, breadth, and a variety of teaching techniques and tools to enhance your learning:

    • Complete, integrated discussion of both C language fundamentals and additional features
    • Clear guidance about when and why to use different parts of the language
    • Hands-on learning with concise and simple examples that develop your understanding of a concept or two at a time
    • Hundreds of practical sample programs
    • Review questions and programming exercises at the end of each chapter to test your understanding
    • Coverage of generic C to give you the greatest flexibility

    Produktinformation

    • Utgivningsdatum:2013-12-19
    • Mått:179 x 228 x 56 mm
    • Vikt:1 660 g
    • Format:Häftad
    • Språk:Engelska
    • Serie:Developer's Library
    • Antal sidor:1 072
    • Upplaga:6
    • Förlag:Pearson Education
    • ISBN:9780321928429

    Utforska kategorier

    • Programmeringsböcker inom Data och IT
    • Programspråk inom Data och IT

    Mer om författaren

    Stephen Prata , now retired, taught astronomy, physics, and programming at the College of Marin in Kentfield, California. He received his B.S. from the California Institute of Technology and his Ph.D. from the University of California, Berkeley. His association with computers began with the computer modeling of star clusters. Stephen as authored or coauthored over a dozen books, including C++ Primer Plus and Unix Primer Plus.

    Innehållsförteckning

    • Preface xxvii1 Getting Ready 1Whence C? 1Why C? 2Design Features 2Efficiency 3Portability 3Power and Flexibility 3Programmer Oriented 3Shortcomings 4Whither C? 4What Computers Do 5High-level Computer Languages and Compilers 6Language Standards 7The First ANSI/ISO C Standard 8The C99 Standard 8The C11 Standard 9Using C: Seven Steps 9Step 1: Define the Program Objectives 10Step 2: Design the Program 10Step 3: Write the Code 11Step 4: Compile 11Step 5: Run the Program 12Step 6: Test and Debug the Program 12Step 7: Maintain and Modify the Program 13Commentary 13Programming Mechanics 13Object Code Files, Executable Files, and Libraries 14Unix System 16The GNU Compiler Collection and the LLVM Project 18Linux Systems 18Command-Line Compilers for the PC 19Integrated Development Environments (Windows) 19The Windows/Linux Option 21C on the Macintosh 21How This Book Is Organized 22Conventions Used in This Book 22Typeface 22Program Output 23Special Elements 24Summary 24Review Questions 25Programming Exercise 252 Introducing C 27A Simple Example of C 27The Example Explained 28Pass 1: Quick Synopsis 30Pass 2: Program Details 31The Structure of a Simple Program 40Tips on Making Your Programs Readable 41Taking Another Step in Using C 42Documentation 43Multiple Declarations 43Multiplication 43Printing Multiple Values 43While You're at It–Multiple Functions 44Introducing Debugging 46Syntax Errors 46Semantic Errors 47Program State 49Keywords and Reserved Identifiers 49Key Concepts 50Summary 51Review Questions 51Programming Exercises 533 Data and C 55A Sample Program 55What's New in This Program? 57Data Variables and Constants 59Data: Data-Type Keywords 59Integer Versus Floating-Point Types 60The Integer 61The Floating-Point Number 61Basic C Data Types 62The int Type 62Other Integer Types 66Using Characters: Type char 71The _Bool Type 77Portable Types: stdint.h and inttypes.h 77Types float, double, and long double 79Complex and Imaginary Types 85Beyond the Basic Types 85Type Sizes 87Using Data Types 88Arguments and Pitfalls 89One More Example: Escape Sequences 91What Happens When the Program Runs 91Flushing the Output 92Key Concepts 93Summary 93Review Questions 94Programming Exercises 974 Character Strings and Formatted Input/Output 99Introductory Program 99Character Strings: An Introduction 101Type char Arrays and the Null Character 101Using Strings 102The strlen() Function 103Constants and the C Preprocessor 106The const Modifier 109Manifest Constants on the Job 109Exploring and Exploiting printf() and scanf() 112The printf() Function 112Using printf() 113Conversion Specification Modifiers for printf() 115What Does a Conversion Specification Convert? 122Using scanf() 128The * Modifier with printf() and scanf() 133Usage Tips for printf() 135Key Concepts 136Summary 137Review Questions 138Programming Exercises 1405 Operators, Expressions, and Statements 143Introducing Loops 144Fundamental Operators 146Assignment Operator: = 146Addition Operator: + 149Subtraction Operator: — 149Sign Operators: — and + 150Multiplication Operator: * 151Division Operator: / 153Operator Precedence 154Precedence and the Order of Evaluation 156Some Additional Operators 157The sizeof Operator and the size_t Type 158Modulus Operator: % 159Increment and Decrement Operators: ++ and -- 160Decrementing: -- 164Precedence 165Don't Be Too Clever 166Expressions and Statements 167Expressions 167Statements 168Compound Statements (Blocks) 171Type Conversions 174The Cast Operator 176Function with Arguments 177A Sample Program 180Key Concepts 182Summary 182Review Questions 183Programming Exercises 1876 C Control Statements: Looping 189Revisiting the while Loop 190Program Comments 191C-Style Reading Loop 192The while Statement 193Terminating a while Loop 194When a Loop Terminates 194while: An Entry-Condition Loop 195Syntax Points 195Which Is Bigger: Using Relational Operators and Expressions 197What Is Truth? 199What Else Is True? 200Troubles with Truth 201The New _Bool Type 203Precedence of Relational Operators 205Indefinite Loops and Counting Loops 207The for Loop 208Using for for Flexibility 210More Assignment Operators: +=, -=, *=, /=, %= 215The Comma Operator 215Zeno Meets the for Loop 218An Exit-Condition Loop: do while 220Which Loop? 223Nested Loops 224Program Discussion 225A Nested Variation 225Introducing Arrays 226Using a for Loop with an Array 228A Loop Example Using a Function Return Value 230Program Discussion 232Using Functions with Return Values 233Key Concepts 234Summary 235Review Questions 236Programming Exercises 2417 C Control Statements: Branching and Jumps 245The if Statement 246Adding else to the if Statement 248Another Example: Introducing getchar() and putchar() 250The ctype.h Family of Character Functions 252Multiple Choice else if 254Pairing else with if 257More Nested ifs 259Let's Get Logical 263Alternate Spellings: The iso646.h Header File 265Precedence 265Order of Evaluation 266Ranges 267A Word-Count Program 268The Conditional Operator: ?: 271Loop Aids: continue and break 274The continue Statement 274The break Statement 277Multiple Choice: switch and break 280Using the switch Statement 281Reading Only the First Character of a Line 283Multiple Labels 284switch and if else 286The goto Statement 287Avoiding goto 287Key Concepts 291Summary 291Review Questions 292Programming Exercises 2968 Character Input/Output and Input Validation 299Single-Character I/O: getchar() and putchar() 300Buffers 301Terminating Keyboard Input 302Files, Streams, and Keyboard Input 303The End of File 304Redirection and Files 307Unix, Linux, and Windows Command Prompt Redirection 307Creating a Friendlier User Interface 312Working with Buffered Input 312Mixing Numeric and Character Input 314Input Validation 317Analyzing the Program 322The Input Stream and Numbers 323Menu Browsing 324Tasks 324Toward a Smoother Execution 325Mixing Character and Numeric Input 327Key Concepts 330Summary 331Review Questions 331Programming Exercises 3329 Functions 335Reviewing Functions 335Creating and Using a Simple Function 337Analyzing the Program 338Function Arguments 340Defining a Function with an Argument: Formal Parameters 342Prototyping a Function with Arguments 343Calling a Function with an Argument: Actual Arguments 343The Black-Box Viewpoint 345Returning a Value from a Function with return 345Function Types 348ANSI C Function Prototyping 349The Problem 350The ANSI C Solution 351No Arguments and Unspecified Arguments 352Hooray for Prototypes 353Recursion 353Recursion Revealed 354Recursion Fundamentals 355Tail Recursion 356Recursion and Reversal 358Recursion Pros and Cons 360Compiling Programs with Two or More Source Code Files 361Unix 362Linux 362DOS Command-Line Compilers 362Windows and Apple IDE Compilers 362Using Header Files 363Finding Addresses: The & Operator 367Altering Variables in the Calling Function 369Pointers: A First Look 371The Indirection Operator: * 371Declaring Pointers 372Using Pointers to Communicate Between Functions 373Key Concepts 378Summary 378Review Questions 379Programming Exercises 38010 Arrays and Pointers 383Arrays 383Initialization 384Designated Initializers (C99) 388Assigning Array Values 390Array Bounds 390Specifying an Array Size 392Multidimensional Arrays 393Initializing a Two-Dimensional Array 397More Dimensions 398Pointers and Arrays 398Functions, Arrays, and Pointers 401Using Pointer Parameters 404Comment: Pointers and Arrays 407Pointer Operations 407Protecting Array Contents 412Using const with Formal Parameters 413More About const 415Pointers and Multidimensional Arrays 417Pointers to Multidimensional Arrays 420Pointer Compatibility 421Functions and Multidimensional Arrays 423Variable-Length Arrays (VLAs) 427Compound Literals 431Key Concepts 434Summary 435Review Questions 436Programming Exercises 43911 Character Strings and String Functions 441Representing Strings and String I/O 441Defining Strings Within a Program 442Pointers and Strings 451String Input 453Creating Space 453The Unfortunate gets() Function 453The Alternatives to gets() 455The scanf() Function 462String Output 464The puts() Function 464The fputs() Function 465The printf() Function 466The Do-It-Yourself Option 466String Functions 469The strlen() Function 469The strcat() Function 471The strncat() Function 473The strcmp() Function 475The strcpy() and strncpy() Functions 482The sprintf() Function 487Other String Functions 489A String Example: Sorting Strings 491Sorting Pointers Instead of Strings 493The Selection Sort Algorithm 494The ctype.h Character Functions and Strings 495Command-Line Arguments 497Command-Line Arguments in Integrated Environments 500Command-Line Arguments with the Macintosh 500String-to-Number Conversions 500Key Concepts 504Summary 504Review Questions 505Programming Exercises 50812 Storage Classes, Linkage, and Memory Management 511Storage Classes 511Scope 513Linkage 515Storage Duration 516Automatic Variables 518Register Variables 522Static Variables with Block Scope 522Static Variables with External Linkage 524Static Variables with Internal Linkage 529Multiple Files 530Storage-Class Specifier Roundup 530Storage Classes and Functions 533Which Storage Class? 534A Random-Number Function and a Static Variable 534Roll 'Em 538Allocated Memory: malloc() and free() 543The Importance of free() 547The calloc() Function 548Dynamic Memory Allocation and Variable-Length Arrays 548Storage Classes and Dynamic Memory Allocation 549ANSI C Type Qualifiers 551The const Type Qualifier 552The volatile Type Qualifier 554The restrict Type Qualifier 555The _Atomic Type Qualifier (C11) 556New Places for Old Keywords 557Key Concepts 558Summary 558Review Questions 559Programming Exercises 56113 File Input/Output 565Communicating with Files 565What Is a File? 566The Text Mode and the Binary Mode 566Levels of I/O 568Standard Files 568Standard I/O 568Checking for Command-Line Arguments 569The fopen() Function 570The getc() and putc() Functions 572End-of-File 572The fclose() Function 57