C Language Interview Questions & Answers

Showing 10 of 130 questions | Page 9

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

81. What is a NULL Pointer? Whether it is same as an uninitialized pointer?

Null pointer is a pointer which points to nothing but uninitialized pointer may point to anywhere.

82. Are pointers integer?

No, pointers are not integers. A pointer is an address. It is a positive number.

83. What does the error ‘Null Pointer Assignment means and what causes this error?

As null pointer points to nothing so accessing a uninitialized pointer or invalid location may cause an error.

84. What is generic pointer in C?

In C void* acts as a generic pointer. When other pointer types are assigned to generic pointer, conversions are applied automatically (implicit conversion).

85. Are the expressions arr and &arr same for an array of integers?

Yes for array of integers they are same.

86. IMP>How pointer variables are initialized?

Pointer variables are initialized by one of the following ways. I. Static memory allocation II. Dynamic memory allocation

87. What is static memory allocation?

Compiler allocates memory space for a declared variable. By using the address of operator, the reserved address is obtained and this address is assigned to a pointer variable. This way of assigning pointer value to a pointer variable at compilation time is known as static memory allocation.

88. What is dynamic memory allocation?

A dynamic memory allocation uses functions such as malloc() or calloc() to get memory dynamically. If these functions are used to get memory dynamically and the values returned by these function are assigned to pointer variables, such a way of allocating memory at run time is known as dynamic memory allocation.

89. What is the purpose of realloc?

It increases or decreases the size of dynamically allocated array. The function realloc (ptr,n) uses two arguments. The first argument ptr is a pointer to a block of memory for which the size is to be altered. The second argument specifies the new size. The size may be increased or decreased. If sufficient space is not available to the old region the function may create a new region.

90. What is an array of pointers?

if the elements of an array are addresses, such an array is called an array of pointers.
Questions and Answers for Competitive Exams Various Entrance Test