Always Learning

Efficient C Programming: A Practical Approach
Mark A. Weiss

ISBN-10: 013362658X
ISBN-13:  9780133626582

Publisher:  Prentice Hall
Copyright:  1995
Format:  Paper; 529 pp
Published:  12/07/1994
Status: Available on Demand   What's this?


Customers outside the U.S., click here.


Print this content

In this section:


Description

Intermediate C programming text and/or ideal advanced course reference supplement. For students who have had previous courses in Pascal, FORTRAN, Scheme, or other programming languages. Excellent complement to CS-2 or CS-1 data structures text.


Features

  • follows three major themes:
    • basic C
    • efficient C
    • other C topics
  • covers the general layout of a C program, control structures, functions, the C preprocessor, and the use of C to achieve efficient programs.
  • explores the I/O library, UNIX programming, and an introduction to C++.


Table of Contents

(Note: each chapter ends with exercises.

I. BASIC C.

1. A General Overview.
History. The Environment. Basic C. Functions. Arrays. Strings. Structures. Pointers. Files. Summary and book organization.

2. Simple Straightline C.
The first program. Tokens and white space. Comments. #include statements. Identifiers. #define statements. Objects and declarations. Integer types and integer constants. Floating-point types and constants. The typedef statement. The sizeof operator. String constants. main. printf. Expressions and simple statements. Assignment Operators. Unary operators. Type conversions. Bitwise operators. scanf. Summary.

3. Decisions, Decisions, Decisions.
Relational and equality operators. Logical operators. Conditional statements. Loops. The switch statement. Occasionally useful stuff. Recurring case study: Part I. Summary.

4. Functions.
The parts of a function. Splitting it up. Functions as paramenters. Storage classes. The return value of main. Rucursion. Recurring case study: Part 2. Summary.

5. The Preprocessor.
Overview. Simple textual substitution via #define. Parameterized macros. #undef and redefinition of macros. The #include statement. Conditional compilation. Miscellaneous directives. Summary.

II. EFFICIENT C: DATA STRUCTURES AND ALGORITHMS.

6. Pointers.
The pointer variable. The address-of operator &. Pointer syntax. The const qualifier with pointers. Call by reference. The generic pointer void *. Pointers to functions. Summary.

7. Arrays.
Basics. Limitations and technicalities of arrays. Passing arrays as parameters. The typedef statement revisited. Shellsort: A simple, but faster sorting algorithm. Multidimensional arrays. Enumerated types: enum. The sizeoff operator revisited. Dynamic allocation of arrays. Pointer arithmetic. Recurring case study: Part 3. Summary.

8. Characters and Strings.
The char type. A char is a small integer. Special character routines and ctype.h. Single-character I/O. The string abstraction. printf and scanf. String operations. Pointers and strings. Additional string routines. A common pointer error. sscanf and sprintf. Case study: A simple word processor. Dangerous stuff: Routines that return *. Array of strings: char * . Recurring case study: Part 4. Summary.

9. Structures.
Syntax for structures. Arrays of structures. Pointers to structures. Case study: Indirect sorting. Generic functions. Incomplete struct declarations and information hiding. Arrays of structures with pointers to functions. Occasionally useful stuff. Recurring case study: Part 5. Summary.

10. Data Structures.
Stacks. Queues. Hash tables. Case study: Single-source shortest paths. Linked lists. Summary.

11. Recursion.
Rackground: Proofs by mathematical induction. Basic recursion. Numerical applications. Searching and sorting. Artificial intelligence. Summary.

III. THE ENVIRONMENT: FILES, UNIX, AND C++.

12. I/O.
printf. scanf. Extending terminal I/O to files. stdin, stdout, and stderr. Binary files. remove and rename. Command line arguments. Summary.

13. UNIX Systems Programming.
The UNIX file system. Processes. UNIX program development tools. Summary.

14. Practical C++.
Syntactic sugar. Templated functions. Classes and the date ADT. A more complex class: The String ADT. Templated classes. Inheritance and dynamic binding. Summary.

Bibliography.
Appendix A. Technical Issues.
Appendix B. Grammar.
Appendix C. Minimums.
Appendix D. The Library.
Appendix E. ASCII Character Set.
Appendix F. MS-MOS C.
Appendix G. Selected Answers.
Index.



Back to top

Log in to the Instructor Resource Center

Login name: 

  Password: 

Forgot login/password?  |  Need to redeem an access code?

        

Instructor Resource Center File Download

This work is protected by local and international copyright laws and is provided solely for the use of instructors in teaching their courses and assessing student learning. Dissemination or sale of any part of this work (including on the World Wide Web) will destroy the integrity of the work and is not permitted. The work and materials from this site should never be made available to students except by instructors using the accompanying text in their classes. All recipients of this work are expected to abide by these restrictions and to honor the intended pedagogical purposes and the needs of other instructors who rely on these materials.

Cancel     I accept, proceed with download

Print this content

Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.

Back to top