C primer
Material type: TextPublication details: New Delhi Mcgraw-Hill Pub. Co. Ltd. 1986Edition: Ed.2Description: x,303pISBN:- 007025995X
- 005.133 HAN
Item type | Current library | Collection | Call number | Status | Date due | Barcode | Item holds | |
---|---|---|---|---|---|---|---|---|
Book | CEPT Library | BK | 005.133 HAN | Available | 015539 |
CONTENTS
Introduction ix
Chapter 1. What C Is 1
What C Isn't 5
Compiling C Programs 6
Chapter 2: How C Looks 12
How This Program Works 13
C Functions 14
Function Definitions 14
Names, Names, Names 19
More on Compiling 22
Chapter 3. Primary Data Types 27
Integers 28
Integers Long, Integers Short 30
Integers, Unsigned 31
Long Constants 31
Characters 32
Alternative Number Systems 35
Escape Sequences 35
Numerical Escape Sequences 37
Floating Point Data 37
Double Precision Data 39
Initializing Variables 39
Chapter 4. Storage Classes 41
Automatic Variables 42
Register Variables 48
Static Variables 49
External Variables 53
Chapter 5. Operators 58
Arithmetic and Assignment Operators 58
Precedence and Associativity 60
Compound Assignment Operators 64
The Modulus Operator 65
Mixed Operands and Type Conversion 65
Casts 68
Increment and Decrement Operators 69
Chapter 6. Control Structures 71
Conditional Execution in C Using the if 71
Looping in C Using the while 79
Chapter 7. Functions 88
Arguments and Returned Values 95
Arguments and Black Boxes 97
The Declaration of Function Types 98
Chapter 8. The C Preprocessor 103
Simple String Replacement 105
Macros With Arguments 108
File Inclusion 113
Undefining Macros 114
Conditional Compilation 115
Chapter 9. Arrays 120
Array Definitions 120
Array Notation 123
Internal Representation of Arrays 125
Multidimensional Arrays 127
String Arrays 129
Chapter 10. An Introduction to Pointers 132
Pointer Notation 132
Pointers and Arrays 137
Pointers and Strings 143
Pointers as Function Arguments 148
Pointer Arithmetic 153
Chapter 11. Input/Output and Library Functions 155
Terminal I/O Routines 157
getchar() and putchar() 157
gets() and puts() 160
printf () and scanf () 164
String-Handling Functions 177
strcatO 177
strcmpO 179
strcpyO 180
strlenO 180
Converting Characters to Integers 181
Generalized Conversions with sprintf () and sscanfO 182
sprintf () 183
sscanfO 184
Chapter 12. Control Structures II 186
Looping in C Using the do-while 187
Looping in C Using the for 190
The Comma Operator 193
Conditional Execution in C Using the switch 196
goto 204
Chapter 13. Structures and Unions 205
Structure Declarations 206
Variables of Type struct 206
The Assignment of Values to Structure Variables 210
Structure Variables and Arrays 210
Pointers to Structure Variables 212
Unions 217
Chapter 14. Operators II 219
Bitwise Operators 220
One's-Complement Operator 221
Bitwise Shift Operators 221
Bitwise AND Operator 224
Bitwise OR Operator 226
Bitwise XOR Operator 227
Casts and Type Casting 230
The sizeof Operator 230
The Conditional Operator 231
The printbitsO Function 232
Chapter 15. unum, Bit Fields, and Masks 235
The enum Data Type 235
Bit Fields 238
Masks 240
Chapter 16. Pointers to Functions 245
Functions of Type void 250
What's the Point of Function Pointers? 252
Chapter 17. File I/O 258
fopen() and fcloseO 259
getc() and putc(] 263
fgets () and fputs () 264
fprintf () and fscanf() 266
getw() and putw() 267
feof() and ferror() 269
fseek() 270
freadO and fwrite() 271
Chapter 18. The Real Thing 276
Dynamic Storage Allocation 276
A Line-by-Line Sorting Program 278
Program Design 278
What Sort of Sort? 281
Firming Up the Design 283
Writing the Code 284
Index 299
There are no comments on this title.