NVIDIA·Software Engineer·Technical Phone Screen
Jul 2026
Got a low-level C++ memory question at NVIDIA that looked simple on the surface but required knowing struct padding rules cold. Not a lot of context in what I have, but it was the kind of thing where if you haven't thought about alignment before, you're just guessing.
- Given a class with members `char buf[BUFF_SIZE]` (where BUFF_SIZE is 1), `size_t length`, and `char *ptr`, what is the result of `sizeof` on that class? Explain using struct alignment and padding.
“This one tripped me up because I jumped straight to adding up the raw sizes: 1 byte for the char array, 4 bytes for size_t, 4 bytes for the pointer on 32-bit.” The rest of the author's notes on Software Engineer interview at NVIDIA, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post