Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Learn C Programming
Learn C Programming

Learn C Programming: A beginner's guide to learning C programming the easy and disciplined way

eBook
R$80 R$209.99
Paperback
R$261.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Learn C Programming

Running Hello, World!

Computer programming is about learning how to solve problems with a computer – about how to get a computer to do all the tedious work for us. The basic development cycle, or process of writing a computer program, is to determine the steps that are necessary to solve the problem at hand and then tell the computer to perform those steps. Our first problem, as we learn this process, is to learn how to write, build, run, and verify a minimal C program.

The following topics will be covered in this chapter:

  • Writing your first C program
  • Understanding the program development cycle
  • Creating, typing into a text editor, and saving your C program
  • Compiling your first C program
  • Running your program, verifying its result, and, if necessary, fixing it
  • Exploring different commenting styles and using them
  • Employing guided chaos, followed by careful observation for deeper learning

Let's get started!

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Learn essential C concepts such as variables, data structures, functions, loops, arrays, and pointers
  • Get to grips with the core programming aspects that form the base of many modern programming languages
  • Explore the expressiveness and versatility of the C language with the help of sample programs

Description

C is a powerful general-purpose programming language that is excellent for beginners to learn. This book will introduce you to computer programming and software development using C. If you're an experienced developer, this book will help you to become familiar with the C programming language. This C programming book takes you through basic programming concepts and shows you how to implement them in C. Throughout the book, you'll create and run programs that make use of one or more C concepts, such as program structure with functions, data types, and conditional statements. You'll also see how to use looping and iteration, arrays, pointers, and strings. As you make progress, you'll cover code documentation, testing and validation methods, basic input/output, and how to write complete programs in C. By the end of the book, you'll have developed basic programming skills in C, that you can apply to other programming languages and will develop a solid foundation for you to advance as a programmer.

Who is this book for?

This book is written for two very diverse audiences. If you're an absolute beginner who only has basic familiarity with operating a computer, this book will help you learn the most fundamental concepts and practices you need to know to become a successful C programmer. If you're an experienced programmer, you'll find the full range of C syntax as well as common C idioms. You can skim through the explanations and focus primarily on the source code provided.

What you will learn

  • Understand fundamental programming concepts and implement them in C
  • Write working programs with an emphasis on code indentation and readability
  • Break existing programs intentionally and learn how to debug code
  • Adopt good coding practices and develop a clean coding style
  • Explore general programming concepts that are applicable to more advanced projects
  • Discover how you can use building blocks to make more complex and interesting programs
  • Use C Standard Library functions and understand why doing this is desirable

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 26, 2020
Length: 646 pages
Edition : 1st
Language : English
ISBN-13 : 9781789349917
Category :
Languages :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jun 26, 2020
Length: 646 pages
Edition : 1st
Language : English
ISBN-13 : 9781789349917
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
R$500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts
R$800 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 741.97
Hands-On Network Programming with C
R$261.99
Practical C Programming
R$217.99
Learn C Programming
R$261.99
Total R$ 741.97 Stars icon

Table of Contents

31 Chapters
Section 1: C Fundamentals Chevron down icon Chevron up icon
Running Hello, World! Chevron down icon Chevron up icon
Understanding Program Structure Chevron down icon Chevron up icon
Working with Basic Data Types Chevron down icon Chevron up icon
Using Variables and Assignment Chevron down icon Chevron up icon
Exploring Operators and Expressions Chevron down icon Chevron up icon
Exploring Conditional Program Flow Chevron down icon Chevron up icon
Exploring Loops and Iteration Chevron down icon Chevron up icon
Creating and Using Enumerations Chevron down icon Chevron up icon
Section 2: Complex Data Types Chevron down icon Chevron up icon
Creating and Using Structures Chevron down icon Chevron up icon
Creating Custom Data Types with typedef Chevron down icon Chevron up icon
Working with Arrays Chevron down icon Chevron up icon
Working with Multi-Dimensional Arrays Chevron down icon Chevron up icon
Using Pointers Chevron down icon Chevron up icon
Understanding Arrays and Pointers Chevron down icon Chevron up icon
Working with Strings Chevron down icon Chevron up icon
Creating and Using More Complex Structures Chevron down icon Chevron up icon
Section 3: Memory Manipulation Chevron down icon Chevron up icon
Understanding Memory Allocation and Lifetime Chevron down icon Chevron up icon
Using Dynamic Memory Allocation Chevron down icon Chevron up icon
Section 4: Input and Output Chevron down icon Chevron up icon
Exploring Formatted Output Chevron down icon Chevron up icon
Getting Input from the Command Line Chevron down icon Chevron up icon
Exploring Formatted Input Chevron down icon Chevron up icon
Working with Files Chevron down icon Chevron up icon
Using File Input and File Output Chevron down icon Chevron up icon
Section 5: Building Blocks for Larger Programs Chevron down icon Chevron up icon
Working with Multi-File Programs Chevron down icon Chevron up icon
Understanding Scope Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(16 Ratings)
5 star 56.3%
4 star 25%
3 star 6.3%
2 star 6.3%
1 star 6.3%
Filter icon Filter
Top Reviews

Filter reviews by




Terrell Aug 12, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am pretty new to programming; I just started down the development journey in September of 2019. I completed two boot camps for Python as well as Java. Meanwhile learning JavaScript as well. I had an interest in C because it looks very similar to Java and that may be an easy language to pick up. This is also the first book I have picked up on C.This book is outstanding. I like the fact that C is a procedural, low level, and compiled language, like JavaScript but looks very similar to Java. The book was written in a way that helped me understand some other concepts that I have been struggling with.This book is the perfect blend of reference material and practical knowledge. There wasn't a single word is wasted in writing this. This book is great for all programmers, even if you never write a line of C, Jeff Szuhay really helps you understand the code that is being written and why. Beginner or experienced, it's worth having this book.
Amazon Verified review Amazon
J4ck J3ff3rson Jan 17, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am very tired as I write this review but, this book has shown me the beauty of the C programming language. There isn't a single thing I would disregard when reading this book. They really help you build your foundations and there is even a fun game you build! Overall, a great book and a very trusty publisher I assure you.
Amazon Verified review Amazon
Matthew Darnell Mar 18, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I just ended chapter 5. I've enjoyed the periodic humor and the content. Jeff has done well at providing good detail with some examples but not filling the entire book with code. He allows you the opportunity to get the concept and then go out and mess around with it. Let me be honest I think this book is hitting home with me as it has tied many concepts to Javascript that I had no idea also are in C. Thanks Jeff! A note to the book company, I had to return the first book because the spine broke in the first week but I'm not going to put a negative for that.
Amazon Verified review Amazon
-TMcN- Jul 07, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you already are an expert at C, and could only keep one book on programming in C, you will of course choose K&R.Everyone else should get K&R and this book. Get this book first if you're learning C; you can get K&R later. If you're already a C developer, you probably still want this book, for the examples, references and trouble-shooting explanations.K&R is the "bible". It was written in 1978. On a wood-burning typewriter, in pencil.Jeff Szuhay's "Learn C Programming" is more up-to-date, easier to read, more complete, has example code with outputs, explains data structures that K&R never even touched and covers troubleshooting tips and topics that even old dogs will benefit from having handy.I've never seen a more complete development book; it's up there with Bruce Schneier's Applied Cryptography in thoroughness and style.* It covers pretty much every topic in C you could need to know.* Exceptionally well organized; topics build upon previous topics.* Consistent. Each section has examples including a section on pre-requisites.* Topics are covered in-depth, including pitfalls and trouble-shooting.The book is broken into major conceptual sections - Fundamentals, Complex Data Types, Memory Manipulation, etc., and each section is further broken into chapters introducing the concepts, going into their complexities (e.g. Heap vs Stack, Pointers to Functions, etc.), with those further broken into the requirements and prerequisites for the chapter, the conceptual introductions and sometimes a quick refresher on the previous relevant material.For example, the file input/output chapter starts by reviewing the streams concepts introduced gently in the Formatted Input section, which ties printf, sprintf and fprintf together nicely without dwelling on them, and does the same with stdin, stdout and stderr. The expert, looking to use this just as a reference, can glance at and skip over the beginning of each chapter, while new students or those needing a refresher has all of the necessary context immediately available, without having to search for it.The author even covers typical gotchas, such as that (in this example), file streams are generally buffered (which of course is explained) and this may result in unexpected behavior. He even provides a short program using a sleep() to demonstrate.That's another strength of this book: The author provides a ton of clear, concise, short examples, instructions on how to build and run them, the output you should receive and what it means.Looking at "memory leaks" in the index (which is found not just under "M" for "Memory Leaks" but also under "H" for "Heap Memory Management - Memory Leaks"), he again provides examples of leaks and how to detect them, including some less-obvious ones such as in linked lists.My coding is no longer primarily in C. This book will serve as a perfect refresher to knock the rust off when needed. My K&R will continue to gather dust.
Amazon Verified review Amazon
Alan Quantz Dec 01, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have an intermediate skill of C programming. I purchased this book to get a better understanding of C to write better programs for the embedded boards I design with at my job. I was pleased to see how well this is written. The explanations are very clear and easy to understand. One extra note is, I don't feel this is for starting from scratch. This starts at about the "Advanced Beginner" level. This is a great book after the Basic C book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.