top of page

What are the frequently asked questions by interviewers in a technical round when someone writes C l

If i am interviewer , what questions i would ask depends on his no of years of experience in C.

1–3 yrs of experience — I would have asked:

  1. Double pointers

  2. design a Macro to return the size of structure

  3. Two Dimensional Arrays, passing and returning arrays from a fn

  4. Different stages of C program compilation

  5. how fork() works

  6. What are various ways to debug memory corruptions.

  7. various IPCs

  8. Heap and Stack memory based Question

4–6 yrs of experience - I would have asked:

  1. How memory is allocated by the OS

  2. Internal and external fragmentation, what can be done to avoid it

  3. System calls, strace()

  4. Trade-of of one IPC over other

  5. various ways to communicate with kernel and comparison

  6. Data (De)Serialization in C

  7. RPC in C

  8. callbacks advanced application

  9. typedef Vs #define

  10. Generic programming in C using macros

  11. Thread Synchronization

  12. Heap and Stack memory based Question

7+ yrs of experience - I would have asked

  1. Have you designed any system module to solve any problem

  2. Design thread library 0 what functionalities would you incorporate in and how ?

  3. What are Dos and Dont’s for writing a robust and flexible library

  4. How to write generic code in C

  5. Various ways to implement timers in C, and comparison of approaches

  6. How Interrupts work ?

  7. IPCs and comparison

  8. How would you convert a C code to C++ and vice versa

  9. How to write a tool to detect memory leaks, Or garbage collection

  10. Design your own memory allocation tool. Why would you write your own memory allocation scheme ?

  11. When to go for Multi-process design over Multi-threaded design and vice versa

  12. How ValGrind tool works

  13. In production code, would you favor recursive but simple logic, Or Non recursive but complex logic, and why ?

If you analyse the pattern,

Candidate with 1–3 yrs of experience, I would chose to ask more of a direct and straightforward Questions.

Candidate with 4–6 yrs of experience, I would chose to ask more advanced technical C Question plus some comparison of approaches based Questions

Candidate with 7+ yrs of experience, I would chose to ask more of a design and Analysis based Question.

Note that, since Question pertains to C, so i have not mentioned Data structures and Algorithms.

Question I would never ask to any candidate :

  1. What is the output of ++i + i++ + ++i + i++

  2. Write a program to print Hello World without semicolon

  3. Write a program to print its own source code, and other useless stuff which you would never going to practice in production code …

hope it helps.

Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page