InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner
1. What is Zig?
Zig is a modern systems programming language focused on performance, safety, and simplicity.
Beginner
2. Who created Zig?
Zig was created by Andrew Kelley in 2016.
Beginner
3. Is Zig garbage collected?
No. Zig does not have a garbage collector. Memory must be managed manually.
Beginner
4. What is Zig mainly used for?
Systems programming, embedded systems, game engines, and performance-critical applications.
Beginner
5. What is a struct in Zig?
A struct is a composite data type that groups variables under one name.
Beginner
6. How do you declare a variable in Zig?
var x: i32 = 10;
Beginner
7. What is const in Zig?
const declares an immutable value.
Beginner
8. What is comptime?
comptime allows code to execute at compile time.
Beginner
9. How are arrays declared in Zig?
Answer Here
Beginner
10. What is a slice?
A slice is a runtime view into an array with length information.
Beginner
11. How are functions declared?
Answer Here
Beginner
12. What is error handling in Zig?
Zig uses error unions and the try keyword for explicit error handling.
Beginner
13. What is optional type?
Optional types can hold a value or null, written as ?Type.
Beginner
14. What is pointer in Zig?
A pointer stores memory address, declared using *Type.
Beginner
15. What is defer?
defer executes code when leaving the current scope.
Intermediate
16. What is error union?
Combines error type with a return value: !Type.
Intermediate
17. What is allocator in Zig?
Allocators manage dynamic memory explicitly.
Intermediate
18. How does Zig handle memory?
Zig uses manual memory management via allocators.
Intermediate
19. What is packed struct?
A struct optimized for exact memory layout.
Intermediate
20. What is union in Zig?
A type that can store different values in the same memory location.
Intermediate
21. What is enum in Zig?
Defines named integer constants.
Intermediate
22. What is tagged union?
A union with an enum tag for safe variant handling.
Intermediate
23. What is async in Zig?
Enables asynchronous function execution.
Intermediate
24. What is inline for?
Executes loop at compile time.
Intermediate
25. What is @import?
Imports other Zig files or standard library modules.
Intermediate
26. What is @sizeOf?
Returns size of a type at compile time.
Intermediate
27. What is build system in Zig?
Zig includes built-in build system using build.zig.
Intermediate
28. What is cross-compilation?
Zig can compile code for multiple platforms without external toolchains.
Intermediate
29. What is sentinel-terminated array?
An array terminated by a specific value like null.
Intermediate
30. What is error propagation?
Using try to forward errors to the caller.
Advanced
31. What is zero-cost abstraction?
Abstractions that compile down to efficient machine code without runtime cost.
Advanced
32. What is comptime function execution?
Functions evaluated entirely during compilation.
Advanced
33. What is memory safety in Zig?
Zig avoids hidden control flow and undefined behavior.
Advanced
34. What is @TypeOf?
Returns the type of a value at compile time.
Advanced
35. What is @compileError?
Generates compile-time error intentionally.
Advanced
36. What is multi-threading in Zig?
Zig supports threading via std.Thread.
Advanced
37. What is bit manipulation?
Zig supports bitwise operators for low-level operations.
Advanced
38. What is memory alignment?
Controlling how data is aligned in memory.
Advanced
39. What is unsafe code in Zig?
Zig avoids unsafe blocks; unsafe behavior must be explicit.
Advanced
40. What is metaprogramming in Zig?
Using comptime features to generate code during compilation.
Coding Round
41. Hello World in Zig
Answer Here
Coding Round
42. Add two numbers
Answer Here
Coding Round
43. Loop example
Answer Here
Coding Round
44. If condition
if (x > 0)
Coding Round
45. Allocate memory
var allocator = std.heap.page_allocator;
Coding Round
46. Error handling example
Answer Here
Coding Round
47. Struct example
Answer Here
Coding Round
48. Optional example
var value: ?i32 = null;
Coding Round
49. Pointer example
Answer Here
Coding Round
50. Compile-time example
Answer Here