Which programming language is this?
int *p = malloc(n * sizeof *p); if (!p) return -1;
Answer: C
malloc with sizeof *p and no cast is idiomatic C; C++ would need a cast.int *p = malloc(n * sizeof *p); if (!p) return -1;
Answer: C
malloc with sizeof *p and no cast is idiomatic C; C++ would need a cast.