64
|
1 extern int printf(const char*,...);
|
|
2
|
|
3 typedef struct test {
|
|
4 int number;
|
|
5 char* string;
|
|
6 } TEST;
|
|
7
|
|
8
|
|
9 void codegear1(TEST);
|
|
10 void codegear2(TEST);
|
|
11 void codegear3(TEST);
|
|
12
|
|
13 void codegear1(TEST testin){
|
|
14 TEST testout;
|
|
15 testout.number = testin.number + 1;
|
|
16 testout.string = testin.string;
|
|
17 codegear2(testout);
|
|
18 }
|
|
19
|
|
20 void codegear2(TEST testin){
|
|
21 TEST testout;
|
|
22 testout.number = testin.number;
|
|
23 testout.string = "Hello";
|
|
24 codegear3(testout);
|
|
25 }
|
|
26
|
|
27 void codegear3(TEST testin){
|
|
28 printf("number = %d\t string= %s\n",testin.number,testin.string);
|
|
29 exit(0);
|
|
30 }
|
|
31
|
|
32 int main(){
|
|
33 TEST test = {0,0};
|
|
34 codegear1(test);
|
|
35 }
|