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-9.c
blob
5cf48c20b727579d80bee4984b8346089110f17a
1
#include <stdio.h>
2
3
main
()
4
{
5
char
first
,
second
;
6
7
second
=
EOF
;
8
9
while
((
first
=
getchar
()) !=
EOF
)
10
{
11
// putchar(first);
12
13
if
(
first
==
' '
)
14
if
(
second
!=
' '
)
15
putchar
(
'
\n
'
);
16
17
if
(
second
!=
' '
)
18
putchar
(
first
);
19
20
second
=
first
;
/* move old char to new char */
21
22
}
23
}