PROGRAMMING WITH C LANGUAGE
PROGRAMMING WITH C LANGUAGE
About the Book
Why write a new book on programming using C language? My experience, based on teaching the use of this language to learn to program, for more than 15 years to students who are just starting out in programming, has led me to make this decision due to several factors:
1.The C language, being a compact language with a limited number of features, presents difficulties to students because of its extensive use of pointers (object addresses) and proximity to the hardware. In the teaching of this language, it was standard to incorporate the use of pointers after half of the subject. As a result of this methodology, students at the end of the course did not fully understand the use of pointers and their diagnosis was that the C language is difficult to learn. About 5 years ago, I modified this methodology and began to teach C language incorporating pointers from the first class. To make this possible, I use analogies that allow students to associate pointers (addresses) with objects, which for them is of immediate understanding.
2. My years of experience teaching this language have allowed me to locate the points where students have difficulty understanding. To correct this, in the book I make extensive use of diagrams that allow better visualization of the difficulties and therefore, notably improve their understanding.
3.In the book, I deliver many solved problems, which emphasize the topics that present greater difficulties, such as creation of complex types, functions, the use of function pointers, dynamic arrangements, etc.
The result of these five years, using this new methodology, has been satisfactory and in my opinion, has generated a change in the students' predisposition towards learning the C language. I have been able to verify, that already in the last third of a course, the students handle with naturality the use of pointers. I consider that most engineer, must know reasonably well how to program using C language and I hope that this new book contributes to that direction.
LeanPub.com allows me to publish this book in its first five chapters and first edition, which I appreciate and certainly motivates me to finish the next chapters and keep, as far as possible, this book updated.
YOU CAN GET A FREE SAMPLE OF THE BOOK FROM:
HTTPS://WWW.PROGRAMACION11.COM
Table of Contents
CONTENTS
Chapter 1: INTRODUCTION
1.0 Origin and versions of the C language
1.1 Characteristics of the C language
1.2 Essential elements of the C language
1.2.1 Types
1.2.2 Objects
1.2.3 Variables
1.2.5 Addresses
1.3 General scheme of a C language program
1.4 Compilation
Chapter 2: NUMBERS, DATA AND TYPES
2.1 Numbers
2.2 Data
2.3 Types
2.3.1 Basic types
2.3.2 Floating or decimal types
2.3.3 Character type
2.4 Variables
2.4.1 C patterns
2.5 Operatos
2.6 Standard library function printf()
2.7 Memory
2.8 Pointers types
2.9 Assignment sign actions
2.10 Identifiers
2.11 Keywords in C language
2.12 Operators in C
2.12.1 Arithmetic operators
2.12.2 Relational operators
2.12.3 Logical operators
2.12.4 Bit-level operators
2.12.5 Assignment operators
2.12.6 Precedence of operators in C language
2.12.6.1 Operators' Associativity
2.12.7 Conversions and cast
2.13 Pointers Arithmetic
2.14 Properties of pointers
2.15 NULL pointer
2.16 Pointer to pointer
2.17 Pointer to void
2.18 Use of const
Chapter 3: ARRAYS AND DYNAMIC MEMORY ALLOCATION
3.1 Arrays
3.2 Declaration of arrays
3.2.1 Initialization of an array
3.2.2 Designated initialization of an array
3.3 Two and three dimensional arrays
3.3.1 Two-dimensional arrays
3.3.2 Three-dimensional arrays
3.4 Pointers on arrays
3.5 Size of an array
3.6 Statement of arrays with empty parentheses
3.7 Character arrays
3.7.1 Arrays of pointers to characters
3.7.2 Variable dimension arrays
3.8 Dynamic memory allocation
3.8.1 malloc()
3.8.2 realloc()
3.8.3 calloc()
3.8.4 Declaration and initialization of a pointer with malloc()
3.8.5 Release of the memory reserved by malloc()
3.8.6 Dynamic creation of two or more dimensional arrays
Chapter 4: EXPRESSIONS, LOOPS, SENTENCES OF SELECTION
STATICS VARIABLES and scanf
4.1 Expressions
4.1.1 Expressions with relational operators
4.1.2 Expressions with logical operators67
4.1.3 Expressions with increment and decrement operators
4.1.4 Expressions with arithmetic operators
4.2 Loops
4.2.1 The for statement
4.2.1.1 Nested for loops
4.2.2 The while statement
4.2.3 The do-while statement
4.3 Selection statements
4.3.1 The if and if-else statements
4.3.2 The switch statement
4.4 Static variables
4.4.1 Blocks in C language
4.4.2 Declaration of static variables
4.4.3 Differences between static and local variables
4.5 scanf function
4.6 Resolved exercises
4.6.1 up to 4.6.10
Chapter 5: FUNCTIONS, typedef, POINTERS TO FUNCTIONS, STACKS AND
RECURSION
5.1 Functions
5.2 Passing arguments by value
5.3 Passing arguments by reference
5.4 Passing an array as an argument to a function
5.5 Return of a function
5.6 Using exit() in a function
5.7 Static variables in a function
5.8 typedef
5.9 Pointers to function
5.10 Stack
5.11 Recursion
5.12 CallBack Functions
5.13 Function returning another function
5.14 inline Functions
5.15 Resolved exercises
5.15.1 up to 5.15.10
Chapter 6: STRUCTURES, UNIONS AND ENUMERATIONS
Chapter 7: COMPILATION AND MEMORY MODEL
Chapter 8: STANDARD LIBRARY
Chapter 9: INPUT/OUTPUT
Chapter 10: to be defined
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them