Blame view

lab2/memory_access.c 350 Bytes
c7c188d74   kmazouzi   add memory leak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  
  #include <stdlib.h>
  #include <stdio.h>
  #define DIM 100
  int main(int argc, char *argv[])
  {
      //float *a;
      int i;
      float a[DIM];
  //    a = (float *) malloc( sizeof(float) * DIM );
      for( i = 0; i < DIM; ++i) a[i] = 0.0;
     // sup = k;
     // k = a[i];
      a[200] = 99.0;
      printf("GOOD END 
  ");
  //    free(a);
      return(EXIT_SUCCESS);
  }