Mercurial > hg > CbC > CbC_gcc
diff CbC-examples/test01.c @ 16:4c6926a2b9bc
examples.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 24 Sep 2009 12:51:25 +0900 |
parents | |
children | 5d30d517ebed |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test01.c Thu Sep 24 12:51:25 2009 +0900 @@ -0,0 +1,34 @@ +#include<stdio.h> + +int test_code(void){ + printf("\t\ttest_code: return 10\n"); + return 10; +} + +int test_goto(int a){ + printf("\ttest_goto: a = %d\n", a); + //return test_code(); + return test_code(); +} + +int main(int argc, char **argv){ + int ret; + printf("test code\n"); + ret = test_goto(20); + printf("main: ret = %d\n", ret); + + return test_goto2(10,20,30,40,50,60,70,80,90,100); + return 0; +} + +int test_code2(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k){ + printf("\t\ttest_code: return 10\n"); + printf("a=%d,b=%d,c=%d,d=%d,e=%d,f=%d,g=%d,h=%d,i=%d,j=%d,k=%d\n",a,b,c,d,e,f,g,h,i,j,k ); + return a+b+c+d+e+f+g+h+i+j+k; +} + +int test_goto2(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k){ + printf("\ttest_goto: a = %d\n", a); + //return test_code(); + return test_code2(a,b,c,d,e,f,g,h,i,j,k); +}