x Contents
10.9 Functions with Arrays and Pointers 338
10.10 Recursion 346
Summary 350
Exercises 351
11. Preprocessor Directives
______________________________________ 355
11.1 Introduction 355
11.2 The #define Directive 355
11.3 Undefining a Macro 358
11.4 Token Pasting and Stringizing Operators 359
11.5 The # inc lude Directive 360
11.6 Conditional Compilation 361
11.7 The #ifndef Directive 363
11.8 The #error Directive 364
11.9 The# lin e Directive 364
11.10 Inline Directive 365
11.11 The ttpragma Saveregs 365
11.12 The #pragma Directive 365
11.13 The Predefined Macros in Ansi and Turbo C 367
11.14 Standard 1/O Predefined Streams in s td io . h 369
11.15 The Predefined Macros in ctyp e. h 370
Summary 371
Exercises 371
12. Structure and Union 375
12.1 Introduction 375
12.2
Features of Structures 375
12.3
Declaration and Initialization of Structures 376
12.4
Structure within Structure 380
12.5 Array of Structures 383
12.6
Pointer to Structure 386
12.7
Structure and Functions 389
12.8 typedef 393
12.9
Bit Fields 397
12.10 Enumerated Data Type 400
12.11 Union 405
12.12
Calling Bios and Dos Services 406
12.13 Union of Structures 412
Summary 413
Exercises 413
13. Files
417
13.1 Introduction 417
13.2
Streams and File Types 417
13.3 Steps for File Operations 418
13.4
File I/O 428
13.5
Structures Read and Write 436