Professional Documents
Culture Documents
C
. . ,
,
. & ,
T.E.I
Email: savvas@teilar.gr
: .
: / ,
, .
, ...,
MSc: Computer Science, University of Dundee,
Scotland,
PhD: Computer Science, UCD, Ireland, (Scheduling
and Assignment of CPU-Intensive Tasks on Large
Heterogeneous Distributed Systems),
C
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
C,
/ ,
,
C,
- Conditional Statements,
- Repetition Statements,
( ),
,
,
,
.
C
/ C
#1:
,
C?,
C,
,
(compile) (execute - run) .
C
BCPL + B C
Procedural language,
Compilers &
(Operating Systems),
SW (1972 DEC PDP-11, Bell Laboratories)
Pascal , C ,
/
C?
C:
C?
...
#include <stdio.h>
int main()
{
printf(\n ..);
printf(\n C!\n);
return 0;
}
10
??? ?
???
C
( Source)
!!
: ,
C
11
...
(Niklaus Wirth: = + )
,
, (
al-Khwrizm
)
,
C
12
.
,
()
/ ,
.
C
13
a, b
a>b
Flow Diagram
__
14
(?)
()?
,
.
:
C
15
/ .
(central
processing unit CPU)
.
, .
.
C
16
( ?) ...
:
,
,
:
:
CPU,
(RAM),
:
,
,
(),
- Hard
disks,
CDs, DVDs,
...
17
... ( ?)
:
:
, , ...
:
:
,
,
(
, , ...).
, ,...
:
,
,
Control units
(
(software)).
18
,
/ ,
,
, ,
.
19
" ,
CPU
,
,
/ (input-output circuits
- I/O)
()
.
C
20
(): 3
Edit:
(editor) /
,
Compile:
(
),
: ()
.
C
21
...
#include <stdio.h>
int main()
{
printf(\n ..);
printf(\n C!\n);
return 0;
=
}
( ),
= C.
:
C
(semicolon) <;>!!!
C
22
...
#include
Header Files stdio.h, math.h
main
!!! ( )
(braces): { }
return ?
return 0; 0
<main> !
C
23
...
...
#include <stdio.h>
int main()
{
printf(\n ..);
printf(\n C!\n);
return 0;
}
24
...
- Output:
, ...
C!
:
\n = , \t = tab,
C
25
...
...
#include <stdio.h>
int main()
{
printf(\n ..);
printf(\n C!\n);
return 0;
}
26
..
printf(\n ..);
printf(\n C!\n);
printf(\n .. \n C!\n);
27
?
#include <stdio.h>
int main()
{
printf(\n ..);
printf(\n C!\n);
return 0;
}
28
- Compile:
(
- )
:
test.out (Linux)
test.exe (Windows)
C
29
#include <stdio.h>
int main()
{
printf(\n\t C\n\n );
printf(\n .\n);
printf(\n C :);
printf(\n\tC++, \n\tJava, \n\tC# \n\tD);
printf(\n\t \n\n);
return 0;
}
30
10
C
.
C :
C++,
Java,
C#
D
C
31
...
,
:
**********
**********
**********
**********
32
: :
#include <stdio.h>
int main()
{
int a=3, b=7, sum;
sum = a+b;
#include <stdio.h>
int main()
{
printf(\n 3+7=%d\n,3+7);
printf(\n =%d\n,sum);
return 0;
return 0;
}
}
C
33
11
- Integers (int,
short, long),
- Real numbers
(float, double)
34
35
:
:
#include <stdio.h>
int main()
{
int a=3, b=7, sum;
sum = a+b;
#include <stdio.h>
int main()
{
printf(\n 3+7=%d\n,3+7);
printf(\n =%d\n,sum);
return 0;
}
return 0;
}
36
12
#1
???
email
: savvas@teilar.gr
37
13