C interviews focus on pointers, memory, strings, undefined behavior, and systems concepts. Be ready to explain trade-offs with Java GC and Rust ownership.
Must-know topics
- Stack vs heap, malloc/free, memory leaks
- Pointers, arrays, pointer arithmetic, const
- Strings, buffer overflows, safe string handling
- struct, enum, typedef, function pointers
- Compilation pipeline, linkage, static vs extern
- Undefined behavior and debugging tools
Important interview questions and answers
- Q: Explain a pointer in 30 seconds.
A: A variable holding an address of another object; dereference with * to read/write that object; NULL means no object. - Q: malloc vs calloc?
A: malloc allocates uninitialized bytes; calloc zero-initializes and takes element count × size. - Q: When not use C?
A: Rapid web prototyping, teams needing memory safety without discipline, or domains where managed languages dominate and native speed is unnecessary.
Self-check
- List three C topics you will review before interviews.
- How does C error handling differ from Java exceptions?
Interview prep
- Must-know C interview topics?
Pointers, stack vs heap, malloc/free, strings and buffers, struct/enum, compilation/linkage, undefined behavior, and comparison with managed languages.
- Explain pointer in 30 seconds?
A variable holding an address; dereference with * to access the pointed-to object; NULL means no valid object.