On to C

Overview

Read this book if you want to add C to your programming-language repertoire. You can use this book to learn the essentials of the language and to preparefor real-world work.

You learn the key concepts in their natural order as features are added to a short yet representative C program. The final version of the program reads information from a file describing stock trades and predicts the next-day's price using a straight-line extrapolation, ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (12) from $1.99   
  • New (1) from $70.00   
  • Used (11) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$70.00
Seller since 2014

Feedback rating:

(149)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Read this book if you want to add C to your programming-language repertoire. You can use this book to learn the essentials of the language and to preparefor real-world work.

You learn the key concepts in their natural order as features are added to a short yet representative C program. The final version of the program reads information from a file describing stock trades and predicts the next-day's price using a straight-line extrapolation, thereby reflecting the popularity of C in applications involving data analysis.

As you see the program evolve, you learn how to:

  • define functions
  • benefit from function abstraction
  • solve ordering problems with function prototypes
  • process data from files
  • create structures and objects
  • use pointer parameters to avoid argument copying
  • use pointer parameters to alter values
  • create new structure objects at run time
  • define constructors, readers, and writers
  • benefit from data abstraction
  • use enumerations and type synonyms to improve readability
  • use unions to capture class distinctions
  • use bits to record state information
  • prevent memory leaks
  • access command-like arguments
  • organize and compile multiple-file programs
  • and much more.


020158042XB04062001

A concise, yet clear introduction to the C programming language. A practicing programmer can use this book to learn the essentials of the language without a lot of time-consuming overhead. Key concepts and technqiues are learned in their natural order as features are added to a short yet representative C program.

Read More Show Less

Product Details

  • ISBN-13: 9780201580426
  • Publisher: Addison Wesley
  • Publication date: 8/3/1994
  • Edition number: 1
  • Pages: 257
  • Product dimensions: 6.90 (w) x 9.30 (h) x 0.70 (d)

Meet the Author

About Patrick Henry Winston

Well-known author Patrick Henry Winston teaches computer science and directs the Artificial Intelligence Laboratory at theMassachusetts Institute of Technology.



020158042XAB04062001

Read More Show Less

Read an Excerpt

PREFACE:

The introduction to On To C follows. Additionalinformation about this book, along with access to software, is availablevia ...

Read More Show Less

Table of Contents

1 How This Book Teaches You the Language 1
2 How to Compile and Run a Simple Program 5
3 How to Declare Variables 11
4 How to Write Arithmetic Expressions 17
5 How to Write Statements That Read Information from Your Keyboard 21
6 How to Define Simple Functions 25
7 How to Benefit from Procedure Abstraction 31
8 How to Work with Local and Global Variables 35
9 How to Perform Tests Using Numerical Predicates 43
10 How to Write One-Way and Two-Way Conditional Statements 45
11 How to Combine Boolean Expressions 53
12 How to Write Iteration Statements 55
13 How to Write Iterative Filters 61
14 How to Write Recursive Functions 65
15 How to Solve Definition Ordering Problems with Function Prototypes 73
16 How to Create Structures and Objects 79
17 How to Work with Arrays of Numbers 85
18 How to Work with Arrays of Structure Objects 91
19 How to Use Pointer Parameters to Avoid Structure Copying 97
20 How to Use Pointer Parameters to Alter Values 107
21 How to Access Array Elements Using Pointers 111
22 How to Create New Structure Objects at Run Time 119
23 How to Store Pointers to Structure Objects 123
24 How to Define Constructor, Reader, and Writer Functions 129
25 How to Benefit from Data Abstraction 135
26 How to Write Multiway Conditional Statements 139
27 How to Use Enumerations to Improve Readability 145
28 How to Use Type Synonyms to Improve Readability 149
29 How to Use Unions to Capture Class Distinctions 153
30 How to Use Bits to Record State Information 161
31 How to Write Functions That Return Character Strings 171
32 How to Write Statements That Read Character Strings 177
33 How to Deposit Character Strings into Structure Objects 181
34 How to Test String Characters 187
35 How to Do Tabular Printing 193
36 How to Read from and Write to Files 197
37 How to Reclaim Memory 203
38 How to Tell Time 211
39 How to Access Command-Line Arguments 217
40 How to Define Functions with a Variable Number of Arguments 229
41 How to Arrange for Conditional Compilation 235
42 How to Arrange Functions in a Multiple-File Program 241
43 How to Arrange Global Variables in a Multiple-File Program 249
44 How to Compile a Multiple-File Program 255
Appendix A: Print Specifications 259
Appendix B: Read Specifications 263
Appendix C: Operator Precedence 267
Appendix D: Formatted Time Display 269
Appendix E: How to Use Sockets to Connect Programs 271
Colophon 283
Index 285
Read More Show Less

Preface

The introduction to On To C follows. Additionalinformation about this book, along with access to software, is availablevia http://www.ascent.com/books

How On To C Teaches You C

The purpose of this book is to help you learn the essentials ofC programming. In this section, you learn why you shouldknow C and how this book is organized.


Early versions of the Unix operating system were written in a languagenamed B, which was based, in part, on a language namedBCPL. The implementers of Unix then developed another, betterlanguage, based on their experience with B. They decided to namethat new language C inasmuch as itsuperseded B.


Today, just about all computers are organized around bits, bytes, andcollections of bytes. Instruction sets vary greatly, however.Accordingly, C allows you to refer to bits, bytes, and collections ofbytes explicitly, but C does not allow you to specify computer-specificinstructions. Instead, your computer-independent, higher-level functiondescriptions are translated for you into sequences of computer-specificinstructions.


Assembler languages allow you to specify functions at the level ofcomputer-specific instructions, which operate on memory chunks of varioussizes. Thus, programs written in assembler languages are notportable.

C, by contrast, allows you to specify sequences of computer-independent,conceptual instructions, which operate on memory chunks of various sizes.Thus, programs written in C are portable.

By encouraging you to think in terms ofmemory chunks, yet discouraging youfrom thinking in terms ofcomputer-specific instructions, C provides asensible tradeoff, enabling you to write programs that are both fast andportable. Accordingly, C is sometimes called a portable assemblerlanguage.


C has became popular by virtue of attractive characteristics, such as the following:

  • C is easy to learn.
  • C programs are fast.
  • C programs are concise.
  • C compilers — programs that translate C programs intomachine instructions — are usually fast and concise.
  • C compilers and C programs run on all sorts of computers,from small personal computers to huge supercomputers.
  • Unix, a popular operating system, happens to be written in C.

There are two principal reasons to learn C:

  • C is often the right language to use in situations requiringmaximum program speed and minimum program size.
  • The supply of powerful off-the-shelf C software modules,both free and for sale, is huge.

Also, because C is so widely used, you often hear programmers debate themerits of other languages in terms of their advantages and disadvantagesrelative to C.


Four principles determined this introductory book's organization and style:

  • The book should get you up and running in the language quickly.
  • The book should answer your basic questions explicitly.
  • The book should encourage you to develop a personal library of solutions to standard programming problems.
  • The book should deepen your understanding of the art of good programming practice.

To get you up and running in C quickly, the sections in this bookgenerally supply you with the most useful approach to each programmingneed, be it to display characters on your screen, to define a new function,or to read data from a file.


To answer your basic questions explicitly, this book is dividedinto parts that generally focus on one issue, which is plainlyannounced in the title of the section. Accordingly, you seetitles such as the following:

  • How to Do Arithmetic
  • How to Define Simple Functions
  • How to Process Data from Files
  • How to Create Structures and Objects
  • How to Organize a Multiple-File Program

To encourage you to develop a personal library of solutions to standardprogramming problems, this book introduces many useful,productivity-increasing, general-purpose, templatelike patterns — sometimescalled cliches by experienced programmers — that you can fill into achieve particular-purpose goals.

Cliches are introduced, because learning to program involves more thanlearning to use programming-language primitives, just as learning tospeak a human language involves more than learning to use vocabulary words.


To deepen your understanding of the art of good programming practice, thisbook emphasizes the value of such ideas as data abstraction andprocedure abstraction.


In this book, single-idea segments, analogous to slides, are arranged insections that are analogous to slide shows. The segments come in severalvarieties: basic segments explain essential ideas; sidetripsegments introduce interesting, but skippable, ideas; practice segments provide opportunities to experiment with new ideas; and highlightssegments summarize important points.


Finally, the book develops a simple, yet realistic C program, which yousee in many versions as your understanding of the language increases. Inits ultimate version, the program reads data from a file containingrecent stock-market information, computes the average price per share andnumber of shares traded, and predicts the next-day's price using a straightline fitted to previous prices. The statistical flavor of the example ismeant to suggest the popularity of C as a language for implementingstatistical-analysis programs.


Highlights

  • C is a programming language that encourages youto think in terms of memory chunks of various sizes, but not in terms ofcomputer-specific instructions.
  • C enjoys considerable popularity, because C is easy tolearn, C programs are fast, C programs are concise, C programs allowyou to think intimately in terms of bits and bytes but not in terms ofcomputer-specific instruction sets, C compilers are usually fast andconcise, C compilers and C programs run on all sorts ofcomputers, off-the-shelf C programs are widely available, andUnix, a popular operating system, happens to be written in C.
  • This book gets you up and running in C quickly; itanswers your basic questions explicitly; it equips you with programpatterns that you can adapt to your own purposes; and it deepens yourunderstanding of the art of good programming practice.


Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)