#include #include int main () { int n, s, p, f; char *m; for (f = 0, n = 1; n <= 10000 && f <= 200; n++) { for (s = 1; s < 40; s++) { m = malloc (s); if (m == NULL) { printf ("n%d s%d: Malloc returned NULL.\n", n, s); } else { // m!= NULL for (p = 0; p < s; p++) { if (m[p] != 0) { f++; printf ("n%d S%d p%d is 0x%02x, not 0\n", n, s, p, m[p] & 255 ); } } // for p free (m); } // m == NULL } // for s } // for n return f > 0; }