work on local extern declarations
[tinycc.git] / tests / tests2 / 21_char_array.c
blobf22f5275c96cc251e8ef3dead03aaf82eb47c363
1 #include <stdio.h>
3 int main()
5 int x = 'a';
6 char y = x;
8 char *a = "hello";
10 printf("%s\n", a);
12 int c;
13 c = *a;
15 char *b;
16 for (b = a; *b != 0; b++)
17 printf("%c: %d\n", *b, *b);
19 char destarray[10];
20 char *dest = &destarray[0];
21 char *src = a;
23 while (*src != 0)
24 *dest++ = *src++;
26 *dest = 0;
28 printf("copied string is %s\n", destarray);
30 return 0;
33 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/