$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #496

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.
Play Programming Languages ▸