| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include <stdlib.h> |
| 2 | #include <stdio.h> | ||||
| 3 | |||||
| 4 | int main(int argc, char **argv) | ||||
| 5 | { | ||||
| 6 | void *ptr = NULL; | ||||
| 7 | ptr = realloc(ptr, 0); | ||||
| 8 | printf("realloc(NULL, 0) -- pointer = %p\n", ptr); | ||||
| 9 | |||||
| 10 | ptr = malloc(0); | ||||
| 11 | printf("malloc(0) -- pointer = %p\n", ptr); | ||||
| 12 | return 0; | ||||
| 13 | } | ||||