| 5 | int a[N],b[N],c[N]; |
| 6 | int i; |
| 7 | int main(){ |
| 8 | for(i= 0; i <N; i++){ |
| 9 | a[i]=i+ 1; |
| 10 | b[i]=i+2; |
| 11 | c[i]=i+3; |
| 12 | } |
| 13 | struct timeval start,end; |
| 14 | gettimeofday(&start,NULL); |
| 15 | for (i=0; i<N;i++) |
| 16 | c[i]=c[i]+a[i]*b[i]; |
| 17 | gettimeofday(&end,NULL); |
| 18 | double timeuse=(end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec)/1000000.0; |
| 19 | printf("time=%f\n",timeuse); |
| 20 | return 0; |
| 21 | } |
nothing calls this directly
no test coverage detected