Table of Contents
Introduction.
WEEK 1. AT A GLANCE.
Where You're Going.
Day 1. Getting Started with C.
A Brief History of the C Language. Why Use C? Preparing to Program.
The Program Development Cycle. Your First C Program.Type & Run 1.
Printing Your Listings.
The First Type & Run.Day 2. The Components of a C Program.A Short C
Program. The Program's Components. A Review of the Parts of a
Program.Day 3. Storing Information: Variables and
Constants.Understanding Your Computer's Memory. Storing Information
with Variables. Numeric Variable Types. Constants.Day 4. The Pieces
of a C Program: Statements, Expressions, and Operators.Statements.
Understanding Expressions. Operators. The if Statement. Evaluating
Relational Expressions. The Logical Operators. More on True/False
Values. Operator Precedence Revisited.Type & Run 2. Find the
Number.
Day 5. Packaging Code in Functions.What Is a Function? How a
Function Works. Functions and Structured Programming. Writing a
Function. Passing Arguments to a Function. Calling Functions. Where
the Functions Belong. Working with Inline Functions.Day 6. Basic
Program Control.Arrays: The Basics. Controlling Program Execution.
Nested Loops.Day 7. Fundamentals of Reading and Writing
Information.Displaying Information On-Screen. Inputting Numeric
Data with scanf(). Using Trigraph Sequences.Week 1 In Review.
WEEK 2 AT A GLANCE.
Where You're Going.
Day 8. Using Numeric Arrays.
What Is an Array? Naming and Declaring Arrays.
Day 9.
Understanding Pointers.
What Is a Pointer? Pointers and Simple Variables. Pointers and
Variable Types. Pointers and Arrays. Pointer Cautions. Array
Subscript Notation and Pointers. Passing Arrays to Functions.Type &
Run 3. Pausing for a Second or Two.
Day 10. Working with Characters and Strings.The char Data Type.
Using Character Variables. Using Strings. Strings and Pointers.
Strings Without Arrays. Displaying Strings and Characters. Reading
Strings from the Keyboard.Day 11. Implementing Structures, Unions,
and TypeDefs.Working with Simple Structures. Using Structures That
are More Complex. Arrays of Structures. Initializing Structures.
Structures and Pointers. Understanding Unions. Creating Synonyms
for Structures with typedef.Day 12. Understanding Variable
Scope.What Is Scope? Creating External Variables. Creating Local
Variables. Local Variables and the main() Function. Which Storage
Class Should You Use? Local Variables and Blocks.Type & Run 4.
Secret Messages.
Day 13. Advanced Program Control.Ending Loops Early. The goto
Statement. Infinite Loops. The switch Statement. Exiting the
Program. Executing Operating System Commands in a Program.Day 14.
Working with the Screen, Printer, and Keyboard.Streams and C. Using
C's Stream Functions. Accepting Keyboard Input. Controlling Output
to the Screen. Redirecting Input and Output. When to Use
fprintf().Week 2 In Review.
WEEK 3 AT A GLANCE.
Where You're Going.
Day 15. Pointers: Beyond the Basics.
Declaring Pointers to Pointers. Pointers and Multidimensional
Arrays. Working with Arrays of Pointers. Working with Pointers to
Functions. Bonus Section: Understanding Linked Lists.
Day 16.
Using Disk Files.
Relating Streams to Disk Files. Understanding the Types of Disk
Files. Using Filenames. Opening a File. Writing and Reading File
Data. File Buffering: Closing and Flushing Files. Understanding
Sequential Versus Random File Access. Detecting the End of a File.
File Management Functions. Using Temporary Files.Type & Run 5.
Counting Characters.
Day 17. Manipulating Strings.Determining String Length. Copying
Strings. Concatenating Strings. Comparing Strings. Searching
Strings. String Conversions. Miscellaneous String Functions.
String-to-Number Conversions. Character Test Functions.Day 18.
Getting More from Functions.Passing Pointers to Functions. Type
void Pointers. Using Functions That Have a Variable Number of
Arguments. Functions That Return a Pointer.Day 19. Exploring the C
Function Library.Mathematical Functions. Dealing with Time.
Error-Handling. Searching and Sorting.Type & Run 6. Calculating
Mortgage Payments.
Day 20. Working with Memory.Type Conversions. Allocating Memory
Storage Space. Manipulating Memory Blocks. Working with Bits.Day
21. Advanced Compiler Use.Programming with Multiple Source-Code
Files. The C Preprocessor. Predefined Macros. Using Command-Line
Arguments.Week 3 In Review.
BONUS WEEK AT A GLANCE.
Where You're Going.
Bonus Day 1. Object-Oriented Programming
Languages.
Procedural and Object-Oriented Languages. The Object-Oriented
Constructs. The Java Programming Language. The C# Programming
Language.
Bonus Day 2. The C++ Programming Language.
Hello C++ World! Understanding the C++ Keywords. The C++ Data
Types. Declaring Variables in C++. Doing Operations in C++. Working
with Functions in C++.
Bonus Day 3. Working with C++ Classes and
Objects.
Working with Complex Data in C++. Using Classes. Creating Access
Member Functions. Structures Versus Classes. Housekeeping with
Classes. Starting with Constructors. Function Overloading
Revisited. Review of the OOP Constructs in C++. Using Classes as
Data Members. Inheriting in C++. A Caution on What You've Learned
About C++.
Bonus Day 4. Java Language Fundamentals.
Structure of a Java Program. Java Program Essentials. Java
Keywords. Java Identifiers. Data Types. Input and Output. Arrays.
Operators. Flow Control.
Bonus Day 5. Working with Java Classes
and Methods.
Defining a Class. Class Methods. Using Inheritance.
Bonus Day 6.
More Java Techniques.
Working with Java Exceptions. Reading and Writing Files. Doing
Graphics and Windows. Programming Java Applets.
Bonus Day 7. The
C# Programming Language.
What Is C#? Why C#? C# Versus Other Programming Languages. Types of
C# Programs. Creating a C# Program. Your First C# Program.
Displaying Basic Information. C# and the Web.
Bonus Week. In
Review.
Appendix A. ASCII Character Chart.
Appendix B. C/C++ Reserved Words.
Appendix C. Working with Binary and Hexadecimal Numbers
The Decimal Number System. The Binary System. The Hexadecimal
System.
Appendix D. Portability Issues.
Guaranteeing ANSI Compatibility. Avoiding the ANSI Standard. Using
Portable Numeric Variables. Portable Structures and
Unions.
Appendix E. Common C Functions
Appendix F. Answers.
Appendix G. Getting Started with Dev-C++.
What is Dev-C++. Installing Dev-C++ on Microsoft Windows. The
Dev-C++ Programs. Using Dev-C++.
Index.Promotional Information
The C programming language is the grandfather of most modern
structured programming languages such as Java, C++, and Pascal.
Learning C is still considered the best way to gain experience with
the core concepts of programming before advancing to the more
popular object-oriented languages currently in widespread use.
Legacy C programs abound in industry, and novice programmers are
often the ones called upon to maintain this code. Finally, C is the
language of choice for embedded systems development for appliances
and small devices. These reasons--and many others--mean that
programmers will be learning C for many years to come.
About the Author
Bradley L. Jones works with internet.com overseeing the EarthWeb
software development channel. This includes overseeing sites such
as Developer.com, CodeGuru.com, and Gamelan.com. He has directed
the development of systems, both small scale and distributed as
well as on a variety of platforms from the Palm OS to mainframe
systems. He has developed systems using such tools as C, C#, C++,
XML, SQL Server, PowerBuilder, Visual Basic, Active Server Pages
(ASP), Satellite Forms, and more. Jones's other authoring credits
include Sams Teach Yourself Advanced C in 21 Days (Sams Publishing)
and Sams Teach Yourself C# in 21 Days (Sams Publishing). Peter
Aitken has been writing about computers and programming for over 10
years, with some 30 books and hundreds of magazine and trade
publication articles to his credit. His recent book titles include
Visual Basic .NET Programming With Peter Aitken, Office XP
Development With VBA, XML the Microsoft Way, Windows Script Host,
and Sams Teach Yourself Visual Basic .NET Internet Programming in
21 Days. For several years he was a Contributing Editor at Visual
Developer magazine where he wrote a popular Visual Basic column,
and he is a regular contributor to Microsoft OfficePro magazine and
the DevX Web site. Peter is the proprietor of PGA Consulting,
providing custom application and Internet development to business,
academia, and government since 1994. You can reach him at
peter@pgacon.com.