What are the frequently asked questions by interviewers in a technical round when someone writes C l
- Admin
- Jul 4, 2017
- 2 min read
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:
Double pointers
design a Macro to return the size of structure
Two Dimensional Arrays, passing and returning arrays from a fn
Different stages of C program compilation
how fork() works
What are various ways to debug memory corruptions.
various IPCs
Heap and Stack memory based Question
4–6 yrs of experience - I would have asked:
How memory is allocated by the OS
Internal and external fragmentation, what can be done to avoid it
System calls, strace()
Trade-of of one IPC over other
various ways to communicate with kernel and comparison
Data (De)Serialization in C
RPC in C
callbacks advanced application
typedef Vs #define
Generic programming in C using macros
Thread Synchronization
Heap and Stack memory based Question
7+ yrs of experience - I would have asked
Have you designed any system module to solve any problem
Design thread library 0 what functionalities would you incorporate in and how ?
What are Dos and Dont’s for writing a robust and flexible library
How to write generic code in C
Various ways to implement timers in C, and comparison of approaches
How Interrupts work ?
IPCs and comparison
How would you convert a C code to C++ and vice versa
How to write a tool to detect memory leaks, Or garbage collection
Design your own memory allocation tool. Why would you write your own memory allocation scheme ?
When to go for Multi-process design over Multi-threaded design and vice versa
How ValGrind tool works
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 :
What is the output of ++i + i++ + ++i + i++
Write a program to print Hello World without semicolon
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.
Commenti