home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l352 / 1.img / EXAMPLES / BIG.C next >
Encoding:
C/C++ Source or Header  |  1992-05-27  |  529 b   |  31 lines

  1. /* 
  2. BIG.C
  3. bcc286 big.c
  4. */
  5.  
  6. #include <stdlib.h>
  7. #include <stdio.h>
  8.  
  9. #define SIZE    512
  10.  
  11. static long huge array[SIZE][SIZE] ;  /* one-megabyte array */
  12.  
  13. main()
  14. {
  15.     int i, j;
  16.  
  17.     printf("Using %lu-byte array\n", 
  18.         (long) SIZE * SIZE * sizeof(long));
  19.  
  20.     for (i=0; i<SIZE; i++)
  21.     {
  22.         for (j=0; j<SIZE; j++)
  23.             array[i][j] = (long) i * j; /* touch every element */
  24.         printf("%d\r", i);              /* display odometer */
  25.     }
  26.  
  27.     printf("done\n");
  28.     return 0;
  29. }
  30.  
  31.