home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / unixlib / !UnixLib / test / c / allocatest < prev    next >
Encoding:
Text File  |  1994-03-08  |  280 b   |  25 lines

  1. #include <stdlib.h>
  2. #include <time.h>
  3. #include <stdio.h>
  4.  
  5. #include "alloca.h"
  6.  
  7. #define ASIZE 2048
  8.  
  9. int
  10. main ()
  11. {
  12.   int *b;
  13.   register int i;
  14.  
  15.   srand (time (0));
  16.  
  17.   b = alloca (ASIZE);
  18.  
  19.   for (i = 0; i < (ASIZE >> 2); i++)
  20.     b[i] = rand ();
  21.  
  22.   printf ("%x\n", b);
  23.   return 0;
  24. }
  25.