Which programming language is this?
struct point { int x, y; };
struct point *p = malloc(sizeof *p);
*p = (struct point){ .x = 3, .y = 4 };
printf("%d\n", p->x + p->y);
Answer: C
Assigning
Play Programming Languages ▸
malloc to a typed pointer without a cast and the (struct point){ .x = 3 } compound literal are C99 and not valid C++.