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:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1988-04-05
|
407 b
|
18 lines
/* undover.c -- illustrates the effect of underinitializing and */
/* overinitializing arrays. */
int Primes[6] = { 1, 2, 3, 5, 7, 11 };
#define NUMP (sizeof(Primes)/sizeof(int))
main()
{
int i;
printf("The first %d primes are: ", NUMP);
for (i = 0; i < NUMP; ++i)
{
printf("%d ", Primes[i]);
}
printf("\n");
}