#### Overview of this book

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.
Preface
Section 1: C Fundamentals
Free Chapter
Running Hello, World!
Understanding Program Structure
Working with Basic Data Types
Exploring Conditional Program Flow
Creating and Using Enumerations
Section 2: Complex Data Types
Creating Custom Data Types with typedef
Working with Arrays
Section 3: Memory Manipulation
Section 4: Input and Output
Getting Input from the Command Line
Section 5: Building Blocks for Larger Programs
Other Books You May Enjoy

# Using format specifiers for floats and doubles

Floating-point numbers are floats, doubles, and long doubles that can be expressed in a number of ways mathematically. They can be expressed naturally where there is a whole number part and a fractional part. They can be expressed in scientific notation where there is a coefficient raised to a power of 10, and it takes the 1.234567 x 10^123form. The decimal point floats such that the coefficient has a whole number part that is between 1 and 10 and the exponent is adjusted accordingly. C provides both of these formats.

The next example program is double.c, and it begins as follows:

`#include <stdio.h>int main( void )  { double aDouble = 987654321.987654321; // the other code snippets go here.}`

In this program, only one value is defined. Whenever the value to be converted into float, it is automatically converted to a double value and then formatted. Therefore, there are no float value-specific type conversions...