repo.or.cz
/
tinycc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
work on local extern declarations
[tinycc.git]
/
tests
/
tests2
/
21_char_array.c
blob
f22f5275c96cc251e8ef3dead03aaf82eb47c363
1
#include <stdio.h>
2
3
int
main
()
4
{
5
int
x
=
'a'
;
6
char
y
=
x
;
7
8
char
*
a
=
"hello"
;
9
10
printf
(
"%s
\n
"
,
a
);
11
12
int
c
;
13
c
= *
a
;
14
15
char
*
b
;
16
for
(
b
=
a
; *
b
!=
0
;
b
++)
17
printf
(
"%c: %d
\n
"
, *
b
, *
b
);
18
19
char
destarray
[
10
];
20
char
*
dest
= &
destarray
[
0
];
21
char
*
src
=
a
;
22
23
while
(*
src
!=
0
)
24
*
dest
++ = *
src
++;
25
26
*
dest
=
0
;
27
28
printf
(
"copied string is %s
\n
"
,
destarray
);
29
30
return
0
;
31
}
32
33
/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/