كتاب C Programming Tutorialكتب تقنية المعلومات

كتاب C Programming Tutorial

Preface xi Preface Every program is limited by the language which is used to writ e it. C is a programmer’s language. Unlike BASIC or Pascal, C was not wri tten as a teaching aid, but as an implementation language. C is a compu ter language and a programming tool which has grown popular because progr ammers like it! It is a tricky language but a masterful one. Sceptics have said that it is a language in which everything which can go wrong does go wron g. True, it does not do much hand holding, but also it does not hold anythi ng back. If you have come to C in the hope of finding a powerful language for writing everyday computer programs, then you will not be disappoint ed. C is ideally suited to modern computers and modern programming. This book is a tutorial. Its aim is to teach C to a beginner, but with enough of the details so as not be outgrown as the years go by. I t presumes that you have some previous aquaintance with programming — y ou need to know what a variable is and what a function is — but you do not ne ed much experience. It is not essential to follow the order of the cha pters rigorously, but if you are a beginner to C it is recommended. When it comes d own to it, most languages have basically the same kinds of features : variables, ways of making loops, ways of making decisions, ways of accessing files etc. If you want to plan your assault on C, think about what you already kn ow about programming and what you expect to look for in C. You will most likely find all of those things and more, as you work though the chapters. The examples programs range from quick one-function progra ms, which do no more than illustrate the sole use of one simple feature, to complete application examples occupying several pages. In places th ese examples make use of features before they have properly been explained. Th ese programs serve as a taster of what is to come. Mark Burgess. 1987, 1999 This book was first written in 1987; this new edition was updat ed and rewritten in 1999. The book was originally published by Dabs Press. Since the book has gone out of print, David Atherton of Dabs and I agr eed to release the manuscript, as per the original contract. This n ew edition is written in Texinfo, which is a documentation system that use s a single source file to produce both on-line information and printed output. You can read this tutorial online, using either the Emacs Info reader, th e standalone Info reader, or a World Wide Web browser, or you can read this same t ext as a typeset, printed book. Table of Contents i Table of Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 High Levels and Low Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Basic ideas about C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 The Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Errors .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 Use of Upper and Lower Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.6 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.7 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2 Reserved words and an example . . . . . . . . . . . 11 2.1 The printf() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 Example Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Operating systems and environments . . . . . . 13 3.1 Files and Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3 Command Languages and Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5 Programming style . . . . . . . . . . . . . . . . . . . . . . . 21 6 The form of a C program . . . . . . . . . . . . . . . . . 23 6.1 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.2 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.3 Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ii 8 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 8.1 Structure diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.2 Program Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.3 Functions with values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8.4 Breaking out early . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.5 The exit() function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.6 Functions and Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8.7 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9 Variables, Types and Declarations . . . . . . . . . 37 9.1 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 9.2 Where to declare things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 9.3 Declarations and Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 9.4 Individual Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 9.4.1 char . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 9.4.2 Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 9.4.3 Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 9.5 Whole numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 9.5.1 Floating Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 9.6 Choosing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.7 Assigning variables to one another . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9.8 Types and The Cast Operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 9.9 Storage class static and extern . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 9.10 Functions, Types and Declarations . . . . . . . . . . . . . . . . . . . . . . . . . 48 9.11 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 10 Parameters and Functions . . . . . . . . . . . . . . . . 51 10.1 Declaring Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 10.2 Value Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 10.3 Functions as actual parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 10.4 Example Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 10.5 Example Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 10.6 Variable Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 10.7 Example Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 10.8 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 11 Scope : Local And Global . . . . . . . . . . . . . . . . 65 11.1 Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 11.2 Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 11.3 Communication : parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 11.4 Example Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 11.5 Style Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 11.6 Scope and Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 11.7 Questions . .
-
من كتب لغة السي كتب لغات البرمجة - مكتبة كتب تقنية المعلومات.

وصف الكتاب : Preface
xi
Preface
Every program is limited by the language which is used to writ
e it. C is a
programmer’s language. Unlike BASIC or Pascal, C was not wri
tten as a
teaching aid, but as an implementation language. C is a compu
ter language
and a programming tool which has grown popular because progr
ammers like
it! It is a tricky language but a masterful one. Sceptics have
said that it is
a language in which everything which can go wrong does go wron
g. True, it
does not do much hand holding, but also it does not hold anythi
ng back. If
you have come to C in the hope of finding a powerful language for
writing
everyday computer programs, then you will not be disappoint
ed. C is ideally
suited to modern computers and modern programming.
This book is a tutorial. Its aim is to teach C to a beginner, but
with
enough of the details so as not be outgrown as the years go by. I
t presumes
that you have some previous aquaintance with programming — y
ou need to
know what a variable is and what a function is — but you do not ne
ed much
experience. It is not essential to follow the order of the cha
pters rigorously,
but if you are a beginner to C it is recommended. When it comes d
own to
it, most languages have basically the same kinds of features
: variables, ways
of making loops, ways of making decisions, ways of accessing
files etc. If you
want to plan your assault on C, think about what you already kn
ow about
programming and what you expect to look for in C. You will most
likely find
all of those things and more, as you work though the chapters.
The examples programs range from quick one-function progra
ms, which
do no more than illustrate the sole use of one simple feature,
to complete
application examples occupying several pages. In places th
ese examples make
use of features before they have properly been explained. Th
ese programs
serve as a taster of what is to come.
Mark Burgess. 1987, 1999
This book was first written in 1987; this new edition was updat
ed and
rewritten in 1999. The book was originally published by Dabs
Press. Since
the book has gone out of print, David Atherton of Dabs and I agr
eed to
release the manuscript, as per the original contract. This n
ew edition is
written in Texinfo, which is a documentation system that use
s a single source
file to produce both on-line information and printed output.
You can read
this tutorial online, using either the Emacs Info reader, th
e standalone Info
reader, or a World Wide Web browser, or you can read this same t
ext as a
typeset, printed book.

Table of Contents
i
Table of Contents
Preface
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
1 Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.1 High Levels and Low Levels
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.2 Basic ideas about C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.3 The Compiler
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.4 Errors
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
8
1.5 Use of Upper and Lower Case
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.6 Declarations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
1.7 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2 Reserved words and an example
. . . . . . . . . . .
11
2.1 The
printf()
function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.2 Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.3 Output
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
12
2.4 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3 Operating systems and environments
. . . . . .
13
3.1 Files and Devices
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.2 Filenames
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.3 Command Languages and Consoles
. . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.4 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
4 Libraries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
4.1 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
5 Programming style
. . . . . . . . . . . . . . . . . . . . . . .
21
6 The form of a C program
. . . . . . . . . . . . . . . . .
23
6.1 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
7 Comments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.1 Example 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.2 Example 2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.3 Question
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
ii
8 Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
8.1 Structure diagram
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
8.2 Program Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
8.3 Functions with values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
8.4 Breaking out early
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
8.5 The
exit()
function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
8.6 Functions and Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
8.7 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
9 Variables, Types and Declarations
. . . . . . . . .
37
9.1 Declarations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
9.2 Where to declare things
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
9.3 Declarations and Initialization
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
9.4 Individual Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
9.4.1
char
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
9.4.2 Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
9.4.3 Integers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.5 Whole numbers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.5.1 Floating Point
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.6 Choosing Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
9.7 Assigning variables to one another
. . . . . . . . . . . . . . . . . . . . . . . . . . .
44
9.8 Types and The Cast Operator
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
9.9 Storage class
static
and
extern
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
9.10 Functions, Types and Declarations
. . . . . . . . . . . . . . . . . . . . . . . . .
48
9.11 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
10 Parameters and Functions
. . . . . . . . . . . . . . . .
51
10.1 Declaring Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
10.2 Value Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
10.3 Functions as actual parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
10.4 Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
10.5 Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
10.6 Variable Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60
10.7 Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
10.8 Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
11 Scope : Local And Global
. . . . . . . . . . . . . . . .
65
11.1 Global Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
11.2 Local Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
11.3 Communication : parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
11.4 Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
11.5 Style Note
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
11.6 Scope and Style
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
11.7 Questions
. .

عدد مرات التحميل : 35157 مرّة / مرات.
تم اضافته في : الأحد , 11 مايو 2008م.

ولتسجيل ملاحظاتك ورأيك حول الكتاب يمكنك المشاركه في التعليقات من هنا:


xi
1  Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.1  High Levels and Low Levels
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.2  Basic ideas about C
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.3  The Compiler
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
1.4  Errors
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
8
1.5  Use of Upper and Lower Case
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
1.6  Declarations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
1.7  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2  Reserved words and an example
. . . . . . . . . . .
11
2.1  The
printf()
function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.2  Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.3  Output
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
12
2.4  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
3  Operating systems and environments
. . . . . .
13
3.1  Files and Devices
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.2  Filenames
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.3  Command Languages and Consoles
. . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.4  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
4  Libraries
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
4.1  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
5  Programming style
. . . . . . . . . . . . . . . . . . . . . . .
21
6  The form of a C program
. . . . . . . . . . . . . . . . .
23
6.1  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
7  Comments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.1  Example 1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.2  Example 2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
7.3  Question
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
ii
8  Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
8.1  Structure diagram
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
8.2  Program Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
8.3  Functions with values
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32
8.4  Breaking out early
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
8.5  The
exit()
function
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
34
8.6  Functions and Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
8.7  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
9  Variables, Types and Declarations
. . . . . . . . .
37
9.1  Declarations
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
9.2  Where to declare things
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
9.3  Declarations and Initialization
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
9.4  Individual Types
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
9.4.1
char
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
9.4.2  Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
9.4.3  Integers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.5  Whole numbers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.5.1  Floating Point
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
9.6  Choosing Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
9.7  Assigning variables to one another
. . . . . . . . . . . . . . . . . . . . . . . . . . .
44
9.8  Types and The Cast Operator
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
9.9  Storage class
static
and
extern
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
47
9.10  Functions, Types and Declarations
. . . . . . . . . . . . . . . . . . . . . . . . .
48
9.11  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
10  Parameters and Functions
. . . . . . . . . . . . . . . .
51
10.1  Declaring Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
10.2  Value Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
10.3  Functions as actual parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
10.4  Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
10.5  Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
10.6  Variable Parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
60
10.7  Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
10.8  Questions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
11  Scope : Local And Global
. . . . . . . . . . . . . . . .
65
11.1  Global Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
11.2  Local Variables
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
11.3  Communication : parameters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
11.4  Example Listing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
11.5  Style Note
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
11.6  Scope and Style
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
11.7  Questions
. . ook.



نوع الكتاب : zip.
اذا اعجبك الكتاب فضلاً اضغط على أعجبني
و يمكنك تحميله من هنا:

تحميل C Programming Tutorial



كتب اخرى في كتب لغة السي

موسوعة البرمجة بلغة السي PDF

قراءة و تحميل كتاب موسوعة البرمجة بلغة السي PDF مجانا

Programming Environments for Novices PDF

قراءة و تحميل كتاب Programming Environments for Novices PDF مجانا

لغة C الشامل PDF

قراءة و تحميل كتاب لغة C الشامل PDF مجانا

البرمجة تحت نظام اللينكس PDF

قراءة و تحميل كتاب البرمجة تحت نظام اللينكس PDF مجانا

مقدمة في البرمجة بلغة C PDF

قراءة و تحميل كتاب مقدمة في البرمجة بلغة C PDF مجانا

المزيد من كتب لغات البرمجة في مكتبة كتب لغات البرمجة , المزيد من كتب الإلكترونيات والطاقة في مكتبة كتب الإلكترونيات والطاقة , المزيد من الكتب التقنية والحاسوبية العامة في مكتبة الكتب التقنية والحاسوبية العامة , المزيد من كتب الكمبيوتر والانترنت في مكتبة كتب الكمبيوتر والانترنت , المزيد من كتب بي اتش بي في مكتبة كتب بي اتش بي , المزيد من كتب شبكات الحاسوب في مكتبة كتب شبكات الحاسوب , المزيد من كتب فجوال بيسك دوت نت في مكتبة كتب فجوال بيسك دوت نت , المزيد من كتب فجوال بيسك 6 في مكتبة كتب فجوال بيسك 6 , المزيد من كتب سي بلس بلس في مكتبة كتب سي بلس بلس
عرض كل كتب تقنية المعلومات ..
اقرأ المزيد في مكتبة كتب إسلامية , اقرأ المزيد في مكتبة كتب تقنية المعلومات , اقرأ المزيد في مكتبة المناهج التعليمية والكتب الدراسية , اقرأ المزيد في مكتبة القصص والروايات والمجلّات , اقرأ المزيد في مكتبة كتب الهندسة والتكنولوجيا , اقرأ المزيد في مكتبة الكتب والموسوعات العامة , اقرأ المزيد في مكتبة كتب تعلم اللغات , اقرأ المزيد في مكتبة كتب التنمية البشرية , اقرأ المزيد في مكتبة الكتب التعليمية , اقرأ المزيد في مكتبة كتب التاريخ , اقرأ المزيد في مكتبة كتب الأطفال قصص ومجلات , اقرأ المزيد في مكتبة كتب الطب , اقرأ المزيد في مكتبة الكتب العلمية , اقرأ المزيد في مكتبة كتب علوم سياسية وقانونية , اقرأ المزيد في مكتبة كتب الأدب , اقرأ المزيد في مكتبة كتب الروايات الأجنبية والعالمية , اقرأ المزيد في مكتبة كتب اللياقة البدنية والصحة العامة , اقرأ المزيد في مكتبة كتب الأسرة والتربية الطبخ والديكور , اقرأ المزيد في مكتبة الكتب الغير مصنّفة , اقرأ المزيد في مكتبة كتب المعاجم واللغات , اقرأ المزيد في مكتبة كتب علوم عسكرية و قانون دولي
جميع مكتبات الكتب ..