Mercurial > hg > CbC > CbC_examples
comparison test01.c @ 0:bacef8675607
init repository
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Oct 2014 17:34:59 +0900 |
parents | |
children | 35d6eabeadb0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bacef8675607 |
---|---|
1 #include<stdio.h> | |
2 | |
3 int test_code(void){ | |
4 printf("\t\ttest_code: return 10\n"); | |
5 return 10; | |
6 } | |
7 | |
8 int test_goto(int a){ | |
9 printf("\ttest_goto: a = %d\n", a); | |
10 //return test_code(); | |
11 return test_code(); | |
12 } | |
13 | |
14 int main(int argc, char **argv){ | |
15 int ret; | |
16 printf("test code\n"); | |
17 ret = test_goto(20); | |
18 printf("main: ret = %d\n", ret); | |
19 | |
20 return test_goto2(10,20,30,40,50,60,70,80,90,100); | |
21 return 0; | |
22 } | |
23 | |
24 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){ | |
25 printf("\t\ttest_code: return 10\n"); | |
26 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 ); | |
27 return a+b+c+d+e+f+g+h+i+j+k; | |
28 } | |
29 | |
30 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){ | |
31 printf("\ttest_goto: a = %d\n", a); | |
32 //return test_code(); | |
33 return test_code2(a,b,c,d,e,f,g,h,i,j,k); | |
34 } |