Creating an Array: Difference between revisions

m
(added standard ml)
m (→‎{{header|C}}: lang tag)
Line 108:
{{works with|Watcom}}
Dynamic
<lang c> #include <stdlib.h> /* for malloc */
#include <string.h> /* for memset */
int n = 10 * sizeof(int);
Line 119:
free(myArray);
myArray = NULL;
}</lang>
 
Static
 
<lang c> int myArray2[10] = { 1, 2, 0}; /* 3..9 := 0 */</lang>
 
=={{header|C++}}==