C Developer Interview Questions & Answers
40 questions for C Developer interviews — 26 easy, 14 medium.
About the C Developer role
A C developer writes and maintains software in C for systems such as networking tools, databases, payment terminals and legacy enterprise applications. Freshers start by fixing bugs, writing modules and unit tests, and learning to debug with GDB and Valgrind. Strong pointer and memory skills are essential, and the role builds a solid base for embedded, systems and performance engineering careers.
After calling realloc, the program sometimes crashes. What could be wrong?
Show answer
What is the two-pointer technique and when is it used?
Show answer
Merge two sorted arrays into a third sorted array.
Show answer
What is the difference between a complete, full and perfect binary tree?
Show answer
Why do you want to work in C and systems programming?
Show answer
What is the difference between char s[] = "hello" and char *s = "hello"?
Show answer
Write a C program that counts lines, words and characters in a file.
Show answer
Explain storage classes in C.
Show answer
You need to update one record in the middle of a large binary file without rewriting it all. How?
Show answer
How do you pass a structure to a function efficiently?
Show answer
Tell me about a time you explained a complex data structure to your team.
Show answer
Implement your own strcmp function.
Show answer
What does sizeof return for a pointer and for an array?
Show answer
Reverse a string in place in C.
Show answer
Define a struct for a student and print all students with marks above 75.
Show answer
A loop that sums large numbers gives a negative result. What is happening?
Show answer
How did you improve your problem solving skills?
Show answer
A program reads a file with while (!feof(fp)) and processes the last line twice. Why?
Show answer
What is the difference between text and binary file modes?
Show answer
Write C code to count the number of set bits in an integer.
Show answer
How is a 2D array stored in memory in C?
Show answer
What are null, dangling, wild and void pointers?
Show answer
Why is gets() dangerous and what should you use instead?
Show answer
What is a monotonic stack?
Show answer
What are the main stages of compiling a C program?
Show answer
Write a function that swaps two integers using pointers.
Show answer
A file opened with fopen is NULL in production but fine on your machine. How do you debug?
Show answer
Write a C function to count words in a sentence.
Show answer
What is an enum in C and what are its advantages?
Show answer
What is a pointer in C?
Show answer
Describe how you approach a coding problem you have never seen before.
Show answer
Write a function that dynamically allocates an array of n integers and fills it with squares.
Show answer
What is the difference between break and continue in C?
Show answer
What is the difference between a declaration and a definition in C?
Show answer
What is the difference between stack and heap allocation?
Show answer
What is the difference between fseek, ftell and rewind?
Show answer
What is the difference between malloc, calloc, realloc and free?
Show answer
What is the difference between an array and a pointer?
Show answer
Write a C program to swap two numbers without using a third variable.
Show answer
Frequently asked questions
What does a C Developer do?
A C developer writes and maintains software in C for systems such as networking tools, databases, payment terminals and legacy enterprise applications. Freshers start by fixing bugs, writing modules and unit tests, and learning to debug with GDB and Valgrind. Strong pointer and memory skills are essential, and the role builds a solid base for embedded, systems and performance engineering careers.
Which skills are tested in a C Developer interview?
Expect questions on C programming, Pointers and memory, GDB debugging, Linux basics, Git. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a C Developer interview?
Revise C Basics, Data Types and Operators, Pointers and Memory Management, Arrays and Strings, Structures, Unions and File Handling first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.