C Programming in easy steps, 4th edition
eBook - ePub

C Programming in easy steps, 4th edition

Updated for the GNU Compiler version 6.3.0 and Windows 10

Mike McGrath

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

C Programming in easy steps, 4th edition

Updated for the GNU Compiler version 6.3.0 and Windows 10

Mike McGrath

Book details
Book preview
Table of contents
Citations

About This Book

C Programming in easy steps, 5th edition has an easy-to-follow style that will appeal to anyone who wants to begin programming in C, from programmers moving from another programming language, to the student who is studying C programming at school or college, or to those seeking a career in computing who need a fundamental understanding of procedural programming.

C Programming in easy steps, 5th edition begins by explaining how to download and install a free C compiler so that you can quickly begin to create your own executable programs by copying the book's examples. You need have no previous knowledge of any programming language so it's ideal for the newcomer to computer programming. Each chapter builds your knowledge of C.

C Programming in easy steps, 5th edition contains separate chapters on the major features of the C language. There are complete example programs that demonstrate each aspect of C together with screenshots that illustrate the output when that program has been executed. The free, downloadable sample code provided via the In Easy Steps website all has coloured syntax-highlighting for clearer understanding.

By the end of this book you will have gained a sound understanding of the C language and be able to write your own C programs and compile them into executable files that can be run on any compatible computer.

Fully updated and revised since the fourth edition, which was published in April 2012 – now covers the GNU Compiler version 6.3.0 and Windows 10.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is C Programming in easy steps, 4th edition an online PDF/ePUB?
Yes, you can access C Programming in easy steps, 4th edition by Mike McGrath in PDF and/or ePUB format, as well as other popular books in Informatik & Programmierung in C. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781840788457
1
Getting Started
Welcome to the world of C. This chapter demonstrates how to create a C program in text, then how to compile it into executable byte form.
Introducing the C language
Installing a C compiler
Writing a C program
Compiling a C program
Understanding compilation
Summary
Introducing the C language
C is a compact, general-purpose computer programming language that was originally developed by Dennis MacAlistair Ritchie for the Unix operating system. It was first implemented on the Digital Equipment Corporation PDP-11 computer in 1972.
image
Dennis M Ritchie, creator of the C programming language.
This new programming language was named “C” as it succeeded an earlier programming language named “B” that had been introduced around 1970.
The Unix operating system and virtually all Unix applications are written in the C language. However, C is not limited to a particular platform and programs can be created on any machine that supports C, including those running the Windows platform.
The flexibility and portability of C made it very popular and the language was formalized in 1989 by the American National Standards Institute (ANSI). The ANSI standard unambiguously defined each aspect of C, thereby eliminating previous uncertainty about the precise syntax of the language.
ANSI C has become the recognized standard for the C language and is described, and demonstrated by examples, in this book.
Why learn C programming?
The C language has been around for quite some time and has seen the introduction of newer programming languages like Java, C++, and C#. Many of these new languages are derived, at least in part, from C – but are much larger in size. The more compact C is better to start out in programming because it’s simpler to learn.
It is easier to move on to learn the newer languages once the principles of C programming have been grasped. For instance, C++ is an extension of C and can be difficult to learn unless you have mastered C programming first.
Despite the extra features available in newer languages, C remains popular because it is versatile and efficient. It is used today on a large number of platforms, for everything from micro-controllers to the most advanced scientific systems. Programmers around the world embrace C because it allows them maximum control and efficiency in their programs.
image
Programs written 20 years ago in C are still just as valid today as they were back then.
Standard C libraries
ANSI C defines a number of standard libraries that contain tried-and-tested functions, which can be used in your own C programs.
The libraries are contained in “header files” that each has a file extension of “.h”. The names of the standard C library header files are listed in the table below with a description of their purpose:
Library:
Description:
stdio.h
Contains input and output functions, types, and macro definitions. This library is used by most C programs and represents almost one third of the entire C libraries
ctype.h
Contains functions for testing characters
string.h
Contains functions for manipulating strings
math.h
Contains mathematical functions
stdlib.h
Contains utility functions for number conversion, storage allocation, etc.
assert.h
Contains a function that can be used to add diagnostics to a program
stdarg.h
Contains a function that can be used to step through a list of function arguments
setjmp.h
Contains a function that can be used to avoid the normal call and return sequence
signal.h
Contains functi...

Table of contents