Menu
CoddyTech

C Interview Questions and Answers

C interview questions on pointers, arrays and strings, memory, structs, the preprocessor and embedded C, plus the output questions written tests are built on. Each topic has its own page of questions, with short answers and code you can run.

99 questions in 9 topics

C Basics Interview Questions

The basics from campus placements and first rounds: building a program, data types, storage classes and functions.

All 15 questions

C Pointers Interview Questions

The topic C interviews spend most time on: invalid pointers, const, function pointers and pointer arithmetic.

All 10 questions

C Arrays and Strings Interview Questions

Arrays, how they decay to pointers, null-terminated strings and the functions that overflow buffers.

All 10 questions

C Memory Management Interview Questions

Dynamic allocation, stack and heap, leaks and the mistakes that cause crashes.

All 10 questions

C Structures and Unions Interview Questions

Structs, unions, padding and the self-referential structs linked lists are made of.

All 10 questions

C Preprocessor Interview Questions

Macros, include guards and conditional compilation, with the macro traps that become output questions.

All 10 questions

C Programming Output Questions

Predict-the-output questions from written tests; each one has a defined result on this build.

All 13 questions

Embedded C Interview Questions

Where firmware interviews start: volatile, register bit operations, fixed-width types and endianness.

All 10 questions

Advanced C Interview Questions

Linkage, aliasing, generic code, variadic functions and the corners of the standard that cause real bugs.

All 11 questions

Frequently Asked Questions

How should I prepare for a C programming interview?

Learn the fundamentals until you can predict the output of short programs: pointers, arrays, strings, structs, storage classes and dynamic memory. Then write the classics by hand in C (string reverse, linked list, binary search, bit counting) and finish with undefined behavior and the preprocessor.

What C topics are asked of freshers, and what of experienced candidates?

Freshers get definitions and output questions: data types, static, pointers, strings, structs versus unions, macros and recursion. Experienced candidates get memory layout, malloc internals, debugging tools, linkage, strict aliasing, undefined behavior and volatile, and must explain why.

Do I need data structures and algorithms for a C interview?

For most software roles, yes: expect a coding question on arrays, strings, linked lists or bits, where pointer handling is part of the test. Embedded roles ask more about registers and interrupts.

How long does it take to prepare for a C interview?

If you already write C, two to three weeks on the topics here and 30 to 50 small problems is usually enough. If C is new to you, plan on one to two months, mostly on pointers and memory.

Which C standard should I know for interviews?

Answer in terms of C99 and C11, which most code targets, and mention C23 (ckd_add, constexpr) only when relevant. Know that // comments, <stdbool.h> and declarations inside for are C99.

Coddy programming languages illustration

Learn to code with Coddy

Get started