repo.or.cz
/
C-Programming-Examples.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added stack address randomization example.
[C-Programming-Examples.git]
/
ex_1-12.c
blob
dbcc240a84554d7ff31b196739a756c8a8474cd2
1
#include <stdio.h>
2
3
#define IN 1
4
#define OUT 0
5
6
main
()
7
{
8
9
char
c
;
10
int
spacefound
;
11
12
while
((
c
=
getchar
()) !=
EOF
)
13
{
14
if
(
c
==
' '
||
c
==
'
\n
'
||
c
==
'
\t
'
)
15
{
16
if
(
spacefound
==
0
)
17
{
18
putchar
(
'
\n
'
);
19
spacefound
=
1
;
20
}
21
}
22
else
23
{
24
putchar
(
c
);
25
spacefound
=
0
;
26
}
27
}
28
29
}