search
Subscription
0
cart
close
You have no products in your basket yet
left
Tech Categories
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
Best Sellers
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
Best Sellers
New Releases
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
New Releases
Books
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
Popular Books
Videos
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
Popular Videos
Audiobooks
Tech Categories
Data Web Development Programming Cloud and Networking Security Game Development Mobile IoT and Hardware Business and Other
Popular Audiobooks
Articles
Newsletters
right
Learn C Programming. - Second Edition

Learn C Programming.: A beginner's guide to learning the most powerful and general-purpose programming language with ease, Second Edition

By Jeff Szuhay
$33.99 $22.99
Book Aug 2022 742 pages 2nd Edition
eBook
$33.99 $22.99
Print
$46.99
Subscription
$15.99 Monthly
eBook
$33.99 $22.99
Print
$46.99
Subscription
$15.99 Monthly

What do you get with eBook?

Feature icon Instant access to your Digital eBook purchase
Feature icon Download this book in EPUB and PDF formats
Feature icon Access this title in our online reader with advanced features
Feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Aug 30, 2022
Length 742 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781801078450
Vendor :
DeepMind
Category :
toc View table of contents toc Preview Book toc Download Code

Key benefits

  • Learn essential C concepts such as variables, data structures, functions, loops, and pointers
  • Grasp the core programming aspects that form the base of many modern programming languages
  • Work with updated code samples and cover array declaration and initialization in detail in this new edition

Description

The foundation for many modern programming languages such as C++, C#, JavaScript, and Go, C is widely used as a system programming language as well as for embedded systems and high-performance computing. With this book, you'll be able to get up to speed with C in no time. The book takes you through basic programming concepts and shows you how to implement them in the C programming language. Throughout the book, you’ll create and run programs that demonstrate essential C concepts, such as program structure with functions, control structures such as loops and conditional statements, and complex data structures. As you make progress, you’ll get to grips with in-code documentation, testing, and validation methods. This new edition expands upon the use of enumerations, arrays, and additional C features, and provides two working programs based on the code used in the book. What's more, this book uses the method of intentional failure, where you'll develop a working program and then purposely break it to see what happens, thereby learning how to recognize possible mistakes when they happen. By the end of this C programming book, you’ll have developed basic programming skills in C that can be easily applied to other programming languages and have gained a solid foundation for you to build on as a programmer.

What you will learn

Implement fundamental programming concepts through C programs Understand the importance of creating complex data types and the functions to manipulate them Develop good coding practices and learn to write clean code Validate your programs before developing them further Use the C Standard Library functions and understand why it is advantageous Build and run a multi-file program with Make Get an overview of how C has changed since its introduction and where it is going

What do you get with eBook?

Feature icon Instant access to your Digital eBook purchase
Feature icon Download this book in EPUB and PDF formats
Feature icon Access this title in our online reader with advanced features
Feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Aug 30, 2022
Length 742 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781801078450
Vendor :
DeepMind
Category :

Table of Contents

37 Chapters
Preface Packt Packt
Preface to the Second Edition
Preface to the First Edition
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Share Your Thoughts
Part 1: C Fundamentals Packt Packt
Part 1: C Fundamentals
Chapter 1:Running Hello, World! Packt Packt
Chapter 1:Running Hello, World!
Technical requirements
Writing your first C program
Understanding the program development cycle
Creating, typing, and saving your first C program
Compiling your first C program
Running your first C program
Writing comments to clarify the program later
Learning to experiment with code
Summary
Chapter 2: Understanding Program Structure Packt Packt
Chapter 2: Understanding Program Structure
Technical requirements
Introducing statements and blocks
Introducing functions
Understanding function definitions
Order of execution
Understanding function declarations
Summary
Questions
Chapter 3: Working with Basic Data Types Packt Packt
Chapter 3: Working with Basic Data Types
Technical requirements
Understanding data types
Bytes and chunks of data
Representing whole numbers
Representing numbers with fractions
Representing single characters
Representing Boolean true/false
Understanding the sizes of data types
Summary
Questions
Chapter 4: Using Variables and Assignments Packt Packt
Chapter 4: Using Variables and Assignments
Technical requirements
Understanding data types and values
Introducing variables
Exploring constants
Using types and assignments
Summary
Questions
Chapter 5: Exploring Operators and Expressions Packt Packt
Chapter 5: Exploring Operators and Expressions
Technical requirements
Understanding expressions and operations
Introducing operations on numbers
Exploring type conversion
Introducing operations on characters
Order of operations and grouping
Summary
Questions
Chapter 6: Exploring Conditional Program Flow Packt Packt
Chapter 6: Exploring Conditional Program Flow
Technical requirements
Understanding conditional expressions
Introducing the if()… else… complex statement
Using a switch()… complex statement
Introducing multiple if()… statements
Using nested if()… else… statements
Summary
Questions
Chapter 7: Exploring Loops and Iterations Packt Packt
Chapter 7: Exploring Loops and Iterations
Technical requirements
Understanding repetition
Understanding brute-force repetition
Introducing the while()… statement
Introducing the for()… statement
Introducing the do … while() statement
Understanding loop equivalency
Understanding unconditional branching – the dos and (mostly) don'ts of goto
Further controlling loops with break and continue
Understanding infinite loops
Summary
Questions
Chapter 8: Creating and Using Enumerations Packt Packt
Chapter 8: Creating and Using Enumerations
Technical requirements
Introducing enumerations
The switch()… statement revisited
Using enumerated item values as literal integer constants
Summary
Questions
Part 2: Complex Data Types Packt Packt
Part 2: Complex Data Types
Chapter 9: Creating and Using Structures Packt Packt
Chapter 9: Creating and Using Structures
Technical requirements
Understanding structures
Performing operations on structures – functions
Structures of structures
The stepping stone to OOP
Summary
Questions
Chapter 10: Creating Custom Data Types with typedef Packt Packt
Chapter 10: Creating Custom Data Types with typedef
Technical requirements
Renaming intrinsic types with typedef
Simplifying the use of enum types with typedef
Simplifying the use of struct types with typedef
Exploring some more useful compiler options
Using a header file for custom types and the typedef specifiers
Summary
Questions
Chapter 11: Working with Arrays Packt Packt
Chapter 11: Working with Arrays
Technical requirements
Declaring and initializing arrays
Understanding variable-length arrays
Accessing array elements
Operating on arrays with loops
Using functions that operate on arrays
Summary
Questions
Chapter 12: Working with Multi-Dimensional Arrays Packt Packt
Chapter 12: Working with Multi-Dimensional Arrays
Technical requirements
Going beyond 1D arrays to multi-dimensional arrays
Declaring and initializing multi-dimensional arrays of various dimensions
Accessing elements of multi-dimensional arrays of various dimensions
Manipulating multi-dimensional arrays using loops within loops
Using multi-dimensional arrays in functions
Summary
Questions
Chapter 13: Using Pointers Packt Packt
Chapter 13: Using Pointers
Technical requirements
Addressing pointers – the boogeyman of C programming
Introducing pointers
Declaring the pointer type, naming pointers, and assigning addresses
Operations with pointers
Verbalizing pointer operations
Variable function arguments
Using pointers to structures
Summary
Questions
Chapter 14: Understanding Arrays and Pointers Packt Packt
Chapter 14: Understanding Arrays and Pointers
Technical requirements
Understanding array names and pointers
Understanding array elements and pointers
Operations on arrays using pointers
Introducing an array of pointers to arrays
Summary
Questions
Chapter 15: Working with Strings Packt Packt
Chapter 15: Working with Strings
Technical requirements
Characters – the building blocks of strings
Exploring C strings
Declaring and initializing a string
Creating and using an array of strings
Common operations on strings – the standard library
Summary
Questions
Chapter 16: Creating and Using More Complex Structures Packt Packt
Chapter 16: Creating and Using More Complex Structures
Technical requirements
Introducing the need for complex structures
Revisiting card4.h
Understanding an array of structures
Using a structure with other structures
Using a structure with arrays
Using a structure with an array of structures
Summary
Questions
Part 3: Memory Manipulation Packt Packt
Part 3: Memory Manipulation
Chapter 17: Understanding Memory Allocation and Lifetime Packt Packt
Chapter 17: Understanding Memory Allocation and Lifetime
Technical requirements
Defining storage classes
Understanding automatic versus dynamic storage classes
Understanding internal versus external storage classes
Exploring the static storage class
Summary
Questions
Chapter 18: Using Dynamic Memory Allocation Packt Packt
Chapter 18: Using Dynamic Memory Allocation
Technical requirements
Introducing dynamic memory
Allocating and releasing dynamic memory
Special considerations for dynamic allocation
The linked list dynamic data structure
Pointers to functions
Other dynamic data structures
Summary
Questions
Part 4: Input and Output Packt Packt
Part 4: Input and Output
Chapter 19: Exploring Formatted Output Packt Packt
Chapter 19: Exploring Formatted Output
Technical requirements
Revisiting printf()
Using format specifiers for unsigned integers
Using format specifiers for signed integers
Using format specifiers for floats and doubles
Using format specifiers for strings and characters
Summary
Questions
Chapter 20: Getting Input from the Command Line Packt Packt
Chapter 20: Getting Input from the Command Line
Technical requirements
Revisiting the main() function
Using argc and argv
Summary
Questions
Chapter 21: Exploring Formatted Input Packt Packt
Chapter 21: Exploring Formatted Input
Technical requirements
Introducing streams
Reading formatted input with scanf()
Using internal data conversion
Exploring unformatted I/O
Summary
Questions
Chapter 22: Working with Files Packt Packt
Chapter 22: Working with Files
Technical requirements
Understanding basic file concepts
Introducing the filesystem essentials
Opening files for reading and writing
Summary
Questions
Chapter 23: Using File Input and File Output Packt Packt
Chapter 23: Using File Input and File Output
Technical requirements
File processing
Creating a file of unsorted names
Reading unsorted names and sorting them for output
Summary
Questions
Part 5: Building Blocks for Larger Programs Packt Packt
Part 5: Building Blocks for Larger Programs
Chapter 24: Working with Multi-File Programs Packt Packt
Chapter 24: Working with Multi-File Programs
Technical requirements
Understanding multi-file programs
Using header files for declarations and source files for definitions
Revisiting the preprocessor
Creating a multi-file program
Building a multi-file program
Summary
Questions
Chapter 25: Understanding Scope Packt Packt
Chapter 25: Understanding Scope
Technical requirements
Defining scope – visibility, extent, and linkage
Exploring variable scope
Understanding the block scope of variables
Understanding scope for functions
Summary
Questions
Chapter 26: Building Multi-File Programs with Make Packt Packt
Chapter 26: Building Multi-File Programs with Make
Technical requirements
Preparing dealer.c for make
Introducing the make utility
Using macros
Creating rules – targets, dependencies, and actions
A general makefile for simple projects
Going further with make
Summary
Questions
Chapter 27:Creating Two Card Programs Packt Packt
Chapter 27:Creating Two Card Programs
Technical requirements
Game one – Blackjack
Game two – One-Handed Solitaire
Summary
Epilogue Packt Packt
Epilogue
Taking the next steps
Assessments Packt Packt
Assessments
Chapter 2 – Understanding Program Structure
Chapter 3 – Working with Basic Data Types
Chapter 4 – Using Variables and Assignments
Chapter 5 – Exploring Operators and Expressions
Chapter 6 – Exploring Conditional Program Flow
Chapter 7 – Exploring Loops and Iteration
Chapter 8 – Creating and Using Enumerations
Chapter 9 – Creating and Using Structures
Chapter 10 – Creating Custom Data Types with typedef
Chapter 11 – Working with Arrays
Chapter 12 – Working with Multi-Dimensional Arrays
Chapter 13 – Using Pointers
Chapter 14 – Understanding Arrays and Pointers
Chapter 15 – Working with Strings
Chapter 16 – Creating and Using More Complex Structures
Chapter 17 – Understanding Memory Allocation and Lifetime
Chapter 18 – Using Dynamic Memory Allocation
Chapter 19 – Exploring Formatted Output
Chapter 20 – Getting Input from the Command Line
Chapter 21 – Exploring Formatted Input
Chapter 22 – Working with Files
Chapter 23 – Using File Input and File Output
Chapter 24 – Working with Multi-File Programs
Chapter 25 – Understanding Scope
Why subscribe?
Other Books You May Enjoy Packt Packt
Other Books You May Enjoy
Packt is searching for authors like you
Share Your Thoughts
Appendix Packt Packt
C definition and keywords
C keywords
Table of operators and their precedence
Summary of useful GCC and Clang compiler options
ASCII character set
The Better String Library (Bstrlib)
A quick introduction to Bstrlib
A few simple examples
Unicode and UTF-8
A UTF to Unicode example
The C standard library
Method 1
Method 2
Method 3
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQS

How do I buy and download an eBook? Packt Packt

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Packt Packt

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Packt Packt
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Packt Packt

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Packt Packt
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Packt Packt

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.