www.gibmonks.com

Main Page




Previous Page
Next Page

[Page 1247]

Appendix E. C Legacy Code Topics

We'll use a signal I have tried and found far-reaching and easy to yell. Waa-hoo!

Zane Grey

It is quite a three-pipe problem.

Sir Arthur Conan Doyle

But yet an union in partition.

William Shakespeare

OBJECTIVES

In this chapter you will learn:

  • To redirect keyboard input to come from a file and redirect screen output to a file.

  • To write functions that use variable-length argument lists.

  • To process command-line arguments.

  • To process unexpected events within a program.

  • To allocate memory dynamically for arrays, using C-style dynamic memory allocation.

  • To resize memory dynamically allocated, using C-style dynamic memory allocation.


[Page 1248]

Outline

E.1 Introduction

E.2 Redirecting Input/Output on UNIX/LINUX/Mac OS X and Windows Systems

E.3 Variable-Length Argument Lists

E.4 Using Command-Line Arguments

E.5 Notes on Compiling Multiple-Source-File Programs

E.6 Program Termination with exit and atexit

E.7 The volatile Type Qualifier

E.8 Suffixes for Integer and Floating-Point Constants

E.9 Signal Handling

E.10 Dynamic Memory Allocation with calloc and realloc

E.11 The Unconditional Branch: goto

E.12 Unions

E.13 Linkage Specifications

E.14 Wrap-Up

Summary

Terminology

Self-Review Exercises

Answers to Self-Review Exercises

Exercises


Previous Page
Next Page