Mercurial > hg > CbC > old > device
view test/tmp.c @ 560:d6ff45d719a5 string-shared
string sharing
author | kono |
---|---|
date | Sat, 07 Jan 2006 18:11:53 +0900 |
parents | 2f577690bcfb |
children |
line wrap: on
line source
int printf(const char *format, ...); int main1(int ac,char *av[],int (*f)(),int g()) { return (*f)(ac)+g(ac); } int g(int k) { return k+1; } main0(ac,av) // implicit defenition { return ac; } int main(ac,av) int ac; char *av[]; { register int i; register char *p; p = av[1]; if (!p) return 1; i = p[1]; p = p+i; printf("#0030:%d %s\n",i,p-i); printf("#0031:%d\n",main1(ac,av,g,g)); return 0; }