Mercurial > hg > CbC > old > examples
annotate func-ptr-array.c @ 2:bf65d90b8dc8
*** empty log message ***
author | kinjo |
---|---|
date | Mon, 28 Nov 2005 13:34:57 +0900 |
parents | e59ebf6fe2b0 |
children |
rev | line source |
---|---|
0 | 1 #include<stdio.h> |
2 int | |
3 aho() | |
4 { | |
5 static int count=0; | |
6 printf("aho%d\n", count++); | |
7 return(0); | |
8 } | |
9 int (*lis[])()={ | |
10 aho, | |
11 aho, | |
12 aho, | |
13 aho, | |
14 aho, | |
15 aho, | |
16 aho, | |
17 (void*)0, | |
18 }; | |
19 int | |
20 main() | |
21 { | |
22 int i; | |
23 for(i=0;lis[i]!=(void*)0;i++){ | |
24 lis[i](); | |
25 } | |
26 return(0); | |
27 } |