...
The following example is based on rule MEM02-A. The header file {{stdlib.h}} contains the function prototype for malloc(). Failing to include stdlib.h causes malloc() to be implicitly defined and the compiler makes the assumption that malloc() has a return type of int.
| Code Block | ||
|---|---|---|
| ||
char *p = malloc(10); |
...