|
z
#include <stdio.h>
int
main (void)
{
double* array;
int i, size;
printf ("How large do you want your array? ");
scanf ("%d", &size);
array = (double *) calloc (size, sizeof(double));
for (i = 0; i < size; ++i)
printf ("%6.2lf", array[i]);
free (array);
return (0);
}
Legend:
preprocessor directives | variable declarations
main function | helper functions | user-defined structures
|
How large do you want your array? 7
0.00 0.00 0.00 0.00 0.00 0.00 0.00
|
|