home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap07 / undover.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-05  |  407 b   |  18 lines

  1. /* undover.c -- illustrates the effect of underinitializing and */
  2. /*              overinitializing arrays.                        */
  3.  
  4. int Primes[6] = { 1, 2, 3, 5, 7, 11 };
  5. #define NUMP (sizeof(Primes)/sizeof(int))
  6.  
  7. main()
  8. {
  9.     int i;
  10.  
  11.     printf("The first %d primes are: ", NUMP);
  12.     for (i = 0; i < NUMP; ++i)
  13.         {
  14.         printf("%d ", Primes[i]);
  15.         }
  16.     printf("\n");
  17. }
  18.