Code Room
Code reviewHard
Question
Review this C array allocator that multiplies count by element size.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
#include <stdlib.h>#include <string.h> int *copy_ints(const int *src, unsigned count) { int *dst = malloc(count * sizeof(int)); if (!dst) return NULL; memcpy(dst, src, count * sizeof(int)); return dst;}Run or narrate your approach, then ask the coach.