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 Nim?
Nim is a statically typed, compiled programming language that combines performance of C with readability of Python.
Beginner
2. Is Nim compiled or interpreted?
Nim is a compiled language. It typically compiles to C, C++, or JavaScript.
Beginner
3. What are key features of Nim?
High performance, meta-programming, cross-platform support, and easy syntax.
Beginner
4. What is indentation significance in Nim?
Nim uses indentation instead of braces to define code blocks, similar to Python.
Beginner
5. How to declare a variable in Nim?
var x: int = 10
Beginner
6. What is let in Nim?
let declares an immutable variable.
Beginner
7. What are basic data types in Nim?
int, float, bool, char, string.
Beginner
8. How to define a function in Nim?
proc add(a:int, b:int): int = a + b
Beginner
9. What is echo in Nim?
Used to print output to console.
Beginner
10. What is a sequence in Nim?
A dynamic array declared using seq[T].
Beginner
11. What is an array in Nim?
A fixed-size collection declared as array[0..4, int].
Beginner
12. What is a tuple?
A collection of values of different types grouped together.
Beginner
13. What is a loop in Nim?
Nim supports for and while loops.
Beginner
14. What is a module in Nim?
A file containing Nim code that can be imported into other files.
Beginner
15. How to import a module?
import math
Intermediate
16. What is object type in Nim?
Used to define custom structured data types.
Intermediate
17. What is inheritance in Nim?
Achieved using object of RootObj.
Intermediate
18. What is a generic in Nim?
A type or procedure that works with multiple data types.
Intermediate
19. What is exception handling?
Using try, except, and finally.
Intermediate
20. What is a macro in Nim?
A compile-time code generation feature.
Intermediate
21. What is template in Nim?
A lightweight macro for code substitution.
Intermediate
22. What is async programming in Nim?
Supported using async/await with asyncdispatch module.
Intermediate
23. What is garbage collection in Nim?
Automatic memory management built into Nim.
Intermediate
24. What is pointer in Nim?
A variable that stores memory address.
Intermediate
25. What is ref in Nim?
A reference type for heap-allocated objects.
Intermediate
26. What is overloading?
Defining multiple procedures with same name but different parameters.
Intermediate
27. What is operator overloading?
Customizing behavior of operators for user-defined types.
Intermediate
28. What is a set in Nim?
A collection of unique values.
Intermediate
29. What is Nimble?
Nim’s package manager.
Intermediate
30. What is FFI in Nim?
Foreign Function Interface to interact with C libraries.
Advanced
31. What is compile-time execution?
Code executed during compilation using macros and static blocks.
Advanced
32. What is metaprogramming?
Writing code that generates or modifies code at compile time.
Advanced
33. What is concept in Nim?
A way to restrict generic types.
Advanced
34. What is ARC/ORC in Nim?
Automatic Reference Counting memory models.
Advanced
35. What is parallel programming support?
Nim supports threading and parallel execution.
Advanced
36. What is pragma in Nim?
Compiler instruction written in curly braces.
Advanced
37. What is destructor in Nim?
A procedure called automatically when object is destroyed.
Advanced
38. What is borrow keyword?
Allows reusing operators from another type.
Advanced
39. What is cross-compilation?
Compiling code for different platforms from one environment.
Advanced
40. What is Nim’s biggest advantage?
C-like performance with Python-like readability.
Coding Round
41. Print Hello World
echo "Hello World"
Coding Round
42. Add two numbers
proc add(a,b:int): int = a + b
Coding Round
43. Loop example
for i in 1..5: echo i
Coding Round
44. Define object
type Person = object name: string age: int
Coding Round
45. Create sequence
var nums: seq[int] = @[1,2,3]
Coding Round
46. Exception handling
try: raise newException(ValueError, "Error") except: echo "Caught"
Coding Round
47. Async example
import asyncdispatch
Coding Round
48. Generic procedure
proc identity[T](x:T): T = x
Coding Round
49. Read input
let name = readLine(stdin)
Coding Round
50. Compile Nim program
nim c filename.nim