view test/tmp.c @ 880:5313ed059cee

no tabs in source
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 03 Apr 2014 10:43:01 +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;
}