Code Room
Code reviewEasycr-g378
Subject Buffer overflowLevel Mid–Senior~16 minCommon in Algorithms & data structures interviewsIndustries Software development, Computer games

Question

Review this C++ code copying a row of a fixed-size tile into a scanline.

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.

Talk through your review
Code to reviewcpp
constexpr int W = 64;struct Tile { uint8_t px[W]; }; void blit(const Tile& t, uint8_t out[W]) {    for (int x = 0; x <= W; ++x) {   // copy the row        out[x] = t.px[x];    }}
Run or narrate your approach, then ask the coach.