Mercurial > hg > CbC > old > device
annotate test/tmp.c @ 75:92dcf107a837 c-code-output
c code output
author | kono |
---|---|
date | Mon, 24 Feb 2003 19:50:20 +0900 |
parents | 64a4e3789fd2 |
children | 096559f07a70 |
rev | line source |
---|---|
53 | 1 |
2 int | |
3 main1(int ac,char *av[],int (*f)(),int g()) | |
4 { | |
5 return (*f)(ac)+g(ac); | |
6 } | |
7 | |
8 int | |
9 g(int k) { | |
10 return k+1; | |
11 } | |
0 | 12 |
13 main0(ac,av) | |
14 { | |
15 return ac; | |
16 } | |
17 | |
18 main(ac,av) | |
19 int ac; | |
20 char *av[]; | |
21 { | |
22 register int i; | |
23 register char *p; | |
24 | |
25 p = av[1]; | |
26 if (!p) return; | |
27 i = p[1]; | |
28 p = p+i; | |
29 printf("%d %s\n",i,p-i); | |
53 | 30 printf("%d\n",main1(ac,av,g,g)); |
0 | 31 } |