C for Java Programmers - Tomasz Muldner

C for Java Programmers

(Autor)

Buch | Softcover
592 Seiten
2000
Pearson (Verlag)
978-0-201-70279-8 (ISBN)
108,95 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Presents C programming techniques to readers familiar the Java concepts. This book centers around concepts as the ability to extend and modify modules, represent enumerations, create concrete and generic modules, and use shallow and deep copying of data elements.
C for Java Programmers takes a unique approach to teaching C to readers already familiar with Java: it presents C by construct, so readers learn the inner workings of the language, and also by problem, so readers become aware of what the language can accomplish. Throughout, the author takes advantage of readers' prior programming experience in the Java environment by making connections between the two languages to relate how different functionalities and tools can arrive at the same solution. As such, topics like explicit storage allocation, "unsafe" pointers, and coding and debugging discipline become increasingly important. Sections on things to remember and common errors also reinforce knowledge of C language features, and numerous executable sample programs and end-of-chapter exercises enhance understanding.

Tomasz M,ldner is a professor of computer science at Acadia University in Nova Scotia, one of Canada's top undergraduate universities. He is the recipient of numerous teaching awards, including the prestigious Acadia University Alumni Excellence in Teaching Award in 1996. He has over 20 years of experience working with C and UNIX, and in 1988 co-authored the book C as a Second Language. His research interests include distributed object-oriented programming, mobile agents, and collaborative applications. Dr. M,ldner received his Ph.D. in mathematics from the Polish Academy of Science in Warsaw, Poland in 1975. 0201702797AB04062001

Preface.


1. Introduction.


Preview.



About C.



Object-Oriented versus Procedural Programming.



A Brief Comparison of C and Java.



Why is C Still Useful?



Development Process.



Compilation, Linking, and Preprocessing.



Portability, Efficiency, and Correctness.



Programming Style.



Programming with Idioms.



2. Example of a C Program.


General Documentation.



Run-Time Libraries and Function Declarations.



Global Definitions.



User-Defined Functions.



The main Function.



Sample Output.



3. Lexical Structure, Primitive Data Types, and Terminal I/0.


Preview.



Lexical Structure.



Alphabet.



Comments.



Trigraphs.



Line Structure.



Tokens.



Identifiers.



Keywords.



Primitive Data Types and Declarations.



Primitive Data Types.



Declarations of Variables and Constants.



Assignment.



The main Program.



Constants.



Integer Constants.



Floating-Point Constants.



Character Constants.



String Constants.



Expressions.



Terminal Input/Output.



Single Character I/O.



Formatted I/O.



Type Conversions.



sizeof.



Conversions.



Type Synonyms: typedef.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



List of Portability Guidelines.



Exercises.



4. Control Structures.


Preview.



Logical Expressions.



Control Statements and Their Idiomatic Use.



Testing and Debugging.



Loops.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



Exercises.



5. Text Files.


Preview.



Introduction.



File Handles.



Opening and Closing Files.



Basic File I/O Operations.



Testing for End-of-Line and End-of-File.



Handling Errors.



List of Common Errors.



List of Idioms.



Exercises.



6. The C Preprocessor.


Preview.



Introduction.



Macros.



Parameterless Macros.



Predefined Macros.



Macros with Parameters.



Undefining and Redefining Macros.



File Inclusion.



Conditional Compilation.



Debugging.



Header Files: Part 1.



Portability.



Line Numbering.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



Exercises.



7. Functions, Scope, and Introduction to Module-Based Programming.


Preview.



Functions and Their Documentation.



Declarations and Definitions.



Functions and Void.



Type Conversion.



The exit Function.



Scope.



Blocks.



Global Variables.



Storage Classes and Lifetime.



Initialization of Variables.



Module-Based Programming: Part 1.



Design for Change.



Sharing Functions and Variables: extern.



Linkage and the static Keyword.



Header Files: Part 2.



Encapsulation.



Using Modules.



Types of Modules.



Overloading Functions: Variable Number of Arguments.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



Exercises.



8. Pointers and Their Applications.


Preview.



Stack and Heap Based Memory.



Basic Terminology.



Declaring and Casting Pointers.



Dereferencing Pointers and the Address Operator.



Pointer Assignments.



Qualified Pointers.



Generic Pointers and NULL.



Pointer Conversions.



Standard Type Definitions.



Heap Memory Management.



Memory Allocation.



Memory Deallocation.



Pointer Arithmetic.



The Sum of a Pointer and an Integer.



Difference of a Pointer and an Integer.



Pointer Comparison: , , , =, ==, !=.



Pointer Subtraction.



Working with Memory Blocks.



File I/O for Memory Blocks: Binary Files.



Current File Position.



Binary Reading and Writing.



Pointers and Functions.



Pointer Parameters.



Protecting Return Values and Parameter Values: const.



The Dangling Reference Problem.



Overriding Functions: Pointers to Functions and Functions as Parameters.



Reusability of Functions: Generic Pointers.



Declarators: Part 1.



Pointers to Blocks Containing Pointers.



Module-Based Programming: Part 2.



Basic Terminology.



Homogenous Collection of Objects.



Pure Modules: Enumeration.



Homogenous Concrete Modules.



Heterogeneous Data Structures.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



List of Portability Guidelines.



Exercises.



9. Strings.


Preview.



Character Processing Functions.



Strings in C.



Definitions of Strings and String Constants.



Strings, Parameters, and Return Values.



Formatted String I/0.



Line-Oriented String I/0.



C String Operations.



Length.



Copying.



Comparisons.



Search.



Processing Tokens.



String-to-Number Conversions.



Standard Error Handling.



Module for String Tokenizing.



Main Function's Arguments.



List of Common Errors.



List of Idioms.



Exercises.



10. Arrays.


Preview.



Single-Dimensional Arrays.



Arrays as Parameters.



Array Initialization and Storage.



Declarators: Part 2.



Multi-Dimensional Arrays.



Dynamic Array Module (with Preconditions).



Testing Preconditions.



Interface.



Application.



Implementation.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



Exercises.



11. Structures and Their Applications.


Preview.



Structures and Classes.



Declaring and Using Structures.



Nested Structures and Incomplete Definitions.



Assigning and Comparing Structures.



Structures and Other Constructs.



Structures and Pointers.



Structures and Functions.



Blocks of Structures and Pointers to Structures.



Structures and Arrays.



Initialization of Structures.



Structures and Pointers to Functions.



Structures and Header Files.



Binary Files: Part 2.



Introduction to Linked Lists.



Module-Based Programming: Part 3.



Implementation of Opaque Types.



Enumerations.



Generic Dynamic Array Module with Enumerations.



List Module.



List of Common Errors.



List of Idioms.



List of Programming Style Guidelines.



List of Portability Guidelines.



Exercises.



12. Enumerated Types and Unions.


Preview.



Enumerated Types.



Unions.



List of Idioms.



List of Programming Style Guidelines.



Exercises.



13. Bitwise Operations and Bit Fields.


Preview.



Bitwise Operations.



Bit Fields.



List of Portability Guidelines.



Exercises.



14. Module-Based Programming: Finale.


Preview.



Error Handling.



Long Jumps.



Exception Handling.



Characterization of Modules.



Shallow and Deep Interfaces.



Lists.



Conclusion.



Exercises.



Appendix A: Precedence and Associativity Tables.


Appendix B: Summary of All Standard Library Functions.


B.1 Formatted Input.



B.2 Formatted Output.



Appendix C: Glossary.


Appendix D: The Complete List of Common Errors.


Chapter 3.



Chapter 4.



Chapter 5.



Chapter 6.



Chapter 7.



Chapter 8.



Chapter 9



Chapter 10.



Chapter 1.



Appendix E: The Complete List of Idioms.


Chapter 3.



Chapter 4.



Chapter 5.



Chapter 6.



Chapter 7.



Chapter 8.



Chapter 9.



Chapter 10.



Chapter 1.



Chapter 12.



Appendix F. The Complete List of Programming Style Guidelines.


Chapter 3.



Chapter 4.



Chapter 6.



Chapter 7.



Chapter 8.



Chapter 10.



Chapter 1.



Chapter 12.



Appendix G: The Complete List of Portability.


Guidelines.



Chapter 3.



Chapter 8.



Chapter 1.



Chapter 13.



Appendix H: Cross Reference Index of Useful Code


Fragments.



References.


Index.

Erscheint lt. Verlag 18.4.2000
Sprache englisch
Maße 100 x 100 mm
Gewicht 100 g
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
ISBN-10 0-201-70279-7 / 0201702797
ISBN-13 978-0-201-70279-8 / 9780201702798
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90