Technical interview questions and answers are essential for clearing a C Language Interview because C is the foundation of all modern programming languages. C interviews typically include questions related to pointers, loops, functions, arrays, memory allocation, structures, and file handling. Whether you are preparing for campus placements or software development roles, companies such as TCS, Wipro, Infosys, Cognizant, and Accenture frequently test your C programming basics. This guide includes the most frequently asked C Language interview questions with clear explanations to help freshers and job seekers build strong conceptual understanding. Learning these questions will help you perform confidently in coding rounds, written tests, and technical interviews.
C programmers should advance their skills by learning C++ programming and mastering data structures for algorithm development
Showing 10 of 130 questions
71. What is recursion?
A recursion function is one which calls itself either directly or indirectly it must halt at a definite point to avoid infinite recursion.
72. Differentiate between for loop and a while loop? What are it uses?
For executing a set of statements fixed number of times we use for loop while when the number of
iterations to be performed is not known in advance we use while loop.
73. What is storage class? What are the different storage classes in C?
Storage class is an attribute that changes the behavior of a variable. It controls the lifetime, scope and linkage. The storage classes in c are auto, register, and extern, static, typedef.
74. What the advantages of using Unions?
When the C compiler is allocating memory for unions it will always reserve enough room for the
largest member.
75. What is the difference between Strings and Arrays?
String is a sequence of characters ending with NULL .it can be treated as a one dimensional array
of characters terminated by a NULL character.
76. What is a far pointer? Where we use it?
In large data model (compact, large, huge) the address B0008000 is acceptable because in these
model all pointers to data are 32bits long. If we use small data model(tiny, small, medium) the above address wont work since in these model each pointer is 16bits long. If we are working in a small data model and want to access the address B0008000 then we use far pointer. Far pointer is always treated as a 32bit pointer and contains a segment address and offset address both of 16bits each. Thus the
77. What is a huge pointer?
Huge pointer is 32bit long containing segment address and offset address. Huge pointers are
normalized pointers so for any given memory address there is only one possible huge address segment: offset pair. Huge pointer arithmetic is doe with calls to special subroutines so its arithmetic slower than any other pointers.
78. What is a normalized pointer, how do we normalize a pointer?
It is a 32bit pointer, which has as much of its value in the segment register as possible. Since
a segment can start every 16bytes so the offset will have a value from 0 to F. for normalization convert the address into 20bit address then use the 16bit for segment address and 4bit for the offset address. Given a pointer 500D: 9407,we convert it to a 20bitabsolute address 549D7,Which then normalized to 549D:0007.
79. What is near pointer?
A near pointer is 16 bits long. It uses the current content of the CS (code segment) register (if
the pointer is pointing to code) or current contents of DS (data segment) register (if the pointer is pointing to data) for the segment part, the offset part is stored in a 16 bit near pointer. Using near pointer limits the data/code to 64kb segment.
80. In C, why is the void pointer useful? When would you use it?
The void pointer is useful because it is a generic pointer that any pointer can be cast into and
back again without loss of information.