Learn C Programming
Second Edition
A beginner's guide to learning the most powerful and general-purpose programming language with ease
Jeff Szuhay
BIRMINGHAMMUMBAI
Learn C ProgrammingSecond Edition
Copyright 2022 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Associate Group Product Manager: Gebin George
Senior Editor: Rohit Singh
Content Development Editor: Kinnari Chohan
Technical Editor: Pradeep Sahu
Copy Editor: Safis Editing
Project Coordinator: Manisha Singh
Proofreader: Safis Editing
Indexer: Hemangini Bari
Production Designer: Alishon Mendonca
Marketing Coordinator: Sonakshi Bubbar
First edition: June 2020
Second edition: August 2022
Production reference: 2110822
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80107-845-0
To Jaimie, my daughter and "inload manager," this book is for you.
Contributors
About the author
Jeff Szuhay is the principal developer at QuarterTil2, which specializes in graphics-rich software chronographs for desktop environments. In his software career of over 35 years, he has engaged in a full range of development activities from systems analysis and systems performance tuning to application design, from initial development through full testing and final delivery.
Throughout that time, he has taught computer applications and programming languages at various educational levels from elementary school students to university students, as well as developing and presenting professional, on-site training.
I would like to thank, first of all, my teachers who instructed, cajoled, and inspired me. Notable among these are George Novacky Ph.D. and Alan Rose Ph.D. I would also like to thank the following colleagues who had the courage to help me see where I went awry: Dave Kipp, Tim Snyder, Sam Caruso, Mark Dalrymple, Tony McNamara, Bill Geraci, and particularly Jonathan Leffler. Lastly, my wife, Linda, who listened patiently through all of it, to whom I am forever grateful.
About the reviewers
Alexey Bokov is an experienced cloud architect. He has previously worked for Microsoft as an Azure technical evangelist and enterprise architect, currently leading cloud strategy at Splunk. His core focus is on new markets and scenarios, helping to enhance security capabilities for top enterprise customers all around the world. He's a long-time contributor as coauthor and reviewer for many Google and Azure books and an active speaker at technical conferences.
I'd like to thank my family, my beautiful wife Yana and amazing son Kostya, who supported my efforts to help the author and publishers of this book.
Shyamal Chandra is a freelance software developer based in Pittsburg, Kansas. He has diverse and deep interests in AI, machine learning, and deep learning. He has coauthored nine publications (including one that has won a Best Paper award), published one eBook on Bayesian networks, and coauthored one patent, along with being a program committee member for SIGCSE 2020. He has participated in the ACM Regional, CS Games, and Carnegie Mellon programming contest. His hobbies include singing, songwriting, acting, dancing, drawing, photography, filmmaking, editing, piano, ultimate frisbee, basketball, table tennis, volleyball, tennis, chess, and eSports. He also has created two podcasts available on iTunes titled Long Tail News and Techno Kungfu.
Nibedit Dey is a software engineer turned serial entrepreneur with over a decade of experience in building complex software-based products with amazing user interfaces. Before starting his entrepreneurial journey, he worked for Larsen & Toubro and Tektronix in different R&D roles. He holds a bachelor's degree in biomedical engineering and a master's degree in digital design and embedded systems. Specializing in Qt and embedded technologies, his current role involves end-to-end ownership of products right from architecture to delivery. Currently, he leads two technology-driven product start-ups named ibrum technologies and AIDIA Health. He is a tech-savvy developer who is passionate about embracing new technologies.
Nemanja Boric has more than a decade's experience in building large-scale systems in C, C++, and D. For the past several years, he's been working as the senior software engineer at Amazon Redshift, and is experienced in distributed systems and database engines. Since 2019, he has represented Amazon on the ISO C++ committee.