Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Guide to C Programming

Guide to C Programming

Ratings: (0)|Views: 4 |Likes:
Published by Ionut Gradinaru
Guide to C Programming
Guide to C Programming

More info:

Published by: Ionut Gradinaru on Aug 27, 2014
Copyright:Traditional Copyright: All rights reserved

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/27/2014

pdf

text

original

 
Beej's Guide to C Programming
Brian “Beej” Hallbeej@beej.us
Revision alpha-25May 17, 2007
Copyright © 2007 Brian “Beej” Hall
 
ii
Contents
1. Foreward...................................................................................................................................1
1.1. Audience11.2. Platform and Compiler11.3. Building under Unix21.4. Official Homepage21.5. Email Policy21.6. Mirroring21.7. Note for Translators21.8. Copyright and Distribution3
2. Programming Building Blocks................................................................................................4
2.1. The Specification42.2. The Implementation52.3. So Much To Do, So Little Time62.4. Hello, World!7
3. Variables, Expressions, and Statements (Oh My)..............................................................10
3.1. Variables103.2. Operators113.3. Expressions123.4. Statements12
4. Building Blocks Revisited......................................................................................................175. Functions.................................................................................................................................18
5.1. Passing by Value195.2. Function Prototypes20
6. Variables, The Sequel............................................................................................................22
6.1. “Up Scope”226.2. Storage Classes24
7. Pointers--Cower In Fear!......................................................................................................26
7.1. Memory and Variables267.2. Pointer Types277.3. Dereferencing287.4. Passing Pointers as Parameters28
8. Structures................................................................................................................................30
8.1. Pointers to
s308.2. Passing
struct
 pointers to functions32
9. Arrays......................................................................................................................................33
9.1. Passing arrays to functions34
10. Strings....................................................................................................................................3711. Dynamic Memory.................................................................................................................39
11.1.
 malloc()
39
 
Contents 
iii
11.2.
free()
4011.3.
realloc()
4011.4.
calloc()
41
12. More Stuff!............................................................................................................................43
12.1. Pointer Arithmetic4312.2. typedef4412.3.
enum
4512.4. More
struct
 declarations4612.5. Command Line Arguments4612.6. Multidimensional Arrays4912.7. Casting and promotion5012.8. Incomplete types5112.9.
void
 pointers5112.10.
NULL
 pointers5312.11. More Static5312.12. Typical Multifile Projects5412.13. The Almighty C Preprocessor5612.14. Pointers to pointers5912.15. Pointers to Functions6112.16. Variable Argument Lists63
13. Standard I/O Library..........................................................................................................67
13.1.
fopen()
6913.2.
freopen()
7113.3.
fclose()
7313.4.
 printf()
7413.5.
scanf()
7813.6.
gets()
8113.7.
getc()
getchar()
8313.8.
 puts()
8413.9.
 putc()
 putchar()
8513.10.
8613.11.
ftell()
8813.12.
fgetpos()
8913.13.
ungetc()
9013.14.
fread ()
9213.15.
fwrite()
9413.16.
feof()
9513.17.
 perror()
9613.18.
remove()
9813.19.
renam e()
9913.20.
tmpfile()
10013.21.
tmpna m()
10113.22.
setbuf()
10313.23.
fflush()
105
14. String Manipulation...........................................................................................................107
14.1.
strlen()
10814.2.
strcmp()
109

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->