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
101. How are Structure passing and returning implemented by the complier?
When structures are passed as argument to functions, the entire structure is typically pushed on
the stack. To avoid this overhead many programmer often prefer to pass pointers to structure instead of actual structures. Structures are often returned from functions in a location pointed to by an extra, compiler-supported ‘hidden argument to the function.
102. what is the similarity between a Structure, Union and enumeration?
All of them let the programmer to define new data type.
103. Can a Structure contain a Pointer to itself?
Yes such structures are called self-referential structures.
104. How can we read/write Structures from/to data files?
To write out a structure we can use fwrite() as Fwrite( &e, sizeof(e),1,fp);Where e is a structure
variable. A corresponding fread() invocation can read the structure back from file. calling fwrite() it writes out sizeof(e) bytes from the address &e. Data files written as memory images with fwrite(),however ,will not be portable, particularly if they contain floating point fields or Pointers. This is because memory layout of structures is machine and compiler
dependent. Therefore, structures w
105. Write a program which employs Recursion?
int fact(int n) { return n > 1 ? n * fact(n 1) : 1; }
106. Write a program which uses Command Line Arguments?
107. What do the ‘c and ‘v in argc and argv stand for?
The c in argc(argument count) stands for the number of command line argument the program is
invoked with and v in argv(argument vector) is a pointer to an array of character string that contain the arguments.
108. what are C tokens?
There are six classes of tokens: identifier, keywords, constants, string literals, operators and other separators.
109. What are C identifiers?
These are names given to various programming element such as variables, function, arrays.It is a combination of letter, digit and underscore.It should begin with letter. Backspace is not allowed.
110. What is preincrement and post increment?
++n (pre increment) increments n before its value is used in an assignment operation or any
expression containing it. n++ (post increment) does increment after the value of n is used.