MCPcopy Create free account
hub / github.com/AdvancedCompiler/AdvancedCompiler / main

Function main

code/Chapter8/8-8.c:15–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 }
14}
15int main(){
16 int i;
17 float* A, * B;
18 int na=6, nb=12;
19 A = (float*)malloc(na * sizeof(float));;
20 B = (float*)malloc(100 * sizeof(float));;
21 for ( i = 0; i < na; i++) {
22 A[i] = rand() % 10;
23 }
24 for ( i = 0; i < 100; i++) {
25 B[i] = rand() % 10;
26 }
27 printf("数组A的值为:\n");
28 for (int i = 0; i < na; i++) {
29 printf(" %.5lf ", A[i]);
30 }
31 printf("\n不展开运算后数组A的值为:\n");
32 func(A, B, na, nb);
33 for (int i = 0; i < na; i++) {
34 printf(" %.5f ",A[i]);
35 }
36 free(A);
37 free(B);
38 return 0;
39}

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected