C Interview Questions Level-1

1. What is C language?
2. What are the key features in C programming language?
3. What is the process to create increment and decrement stamen in C?
4. What are the basic data types associated with C?
5. What is the description for syntax errors?
6. What are reserved words with a programming language?
7. What is the explanation for the dangling pointer in C?
8. Describe static function with its usage?
9. What is the difference between abs() and fabs() functions?
10. Describe Wild Pointers in C?
11. What is the difference between ++a and a++?
12. Describe the difference between = and == symbols in C programming?
13. What is the explanation for prototype function in C?
14. What is the explanation for cyclic nature of data types in C?
15. Describe the header file and its usage in C programming?
16. There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
17. What are the general description for loop statement and available loop types in C?
18. What is a nested loop?
19. What is the general form of function in C?
20. What is a pointer on a pointer in C programming language?
21. What are the valid places to have keyword “Break”?
22. What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
23. What is a sequential access file?
24. What is the method to save data in stack data structure type?
25. What is the significance of C program algorithms?

C Interview Questions Level-2

26. Explain the use of function toupper() with and example code?
27. What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
28. Is it possible to use curly brackets ({}) to enclose single line code in C program?
29. Describe the modifier in C?
30. Why is C known as a mother language?
31. What are the modifiers available in C programming language?
32. What are the features of the C language?
33. What is the process to generate random numbers in C programming language?
34. What is the use of the function in C?
35. Describe newline escape sequence with a sample program?
36. What is the use of a static variable in C?
37. Is that possible to store 32768 in an int data type variable?
38. What is the use of printf() and scanf() functions?
39. What is the difference between call by value and call by reference in C?
40. What is the difference between the local variable and global variable in C?
41. Is there any possibility to create customized header file with C programming language?
42. What is recursion in C?
43. What is an array in C?
44. What is a pointer in C?
45. What is the usage of the pointer in C?
46. What is a NULL pointer in C?
47. What is a far pointer in C?
48. What is the structure?
49. What is a union?
50. What is an auto keyword in C?

C Interview Questions Level-3

51. What is the purpose of sprintf() function?
52. Can we compile a program without main() function?
53. What is a token?
54. What is command line argument?
55. What is the acronym for ANSI?
56. What is the difference between getch() and getche()?
57. What is the newline escape sequence?
58. Who is the main contributor in designing the C language after Dennis Ritchie?
59. What is the difference between near, far and huge pointers?
60. What is the maximum length of an identifier?
61. What is dangling pointer in C?
62. What is pointer to pointer in C?
63. What is static memory allocation?
64. What is dynamic memory allocation?
65. What functions are used for dynamic memory allocation in C language?
66. What is the difference between malloc() and calloc()?
67. Why is C called a mid-level programming language?
68. Who is the founder of C language?
69. When was C language developed?
70. Describe dynamic data structure in C programming language?
71. Is that possible to add pointers to each other?
72. What is indirection?
73. What is typecasting?
74. What are the functions to open and close the file in C language?
75. Can we access the array using a pointer in C language?

C Interview Questions Level-4

76. What is an infinite loop?
77. Write a program to print "hello world" without using a semicolon?
78. Write a program to swap two numbers without using the third variable?
79. Write a program to print Fibonacci series without using recursion?
80. Write a program to print Fibonacci series using recursion?
81. Write a program to check prime number in C Programming?
82. Write a program to check palindrome number in C Programming?
83. Write a program to print factorial of given number without using recursion?
84. Write a program to print factorial of given number using recursion?
85. Write a program to check Armstrong number in C?
86. Write a program to reverse a given number in C?
87. What are the ways to a null pointer can use in C programming language?
88. What is the explanation for modular programming?
89. What is a pointer on pointer?
90. Distinguish between malloc() & calloc() memory allocation.
91. What is keyword auto for?
92. What are the valid places for the keyword break to appear.
93. Explain the syntax for for loop.
94. What is difference between including the header file with-in angular braces < > and double quotes “ “
95. How a negative integer is stored.
96. What is a static variable?
97. What is a NULL pointer?
98. What is the purpose of extern storage specifier?
99. Explain the purpose of the function sprintf().
100. What is the meaning of base address of the array?

C Interview Questions Level-5

101. When should we use the register storage specifier?
102. S++ or S = S+1, which can be recommended to increment the value by 1 and why?
103. What is a dangling pointer?
104. What is the purpose of the keyword typedef?
105. What is lvalue and rvalue?
106. What is the difference between actual and formal parameters?
107. Can a program be compiled without main() function?
108. What is the advantage of declaring void pointers?
109. Where an automatic variable is stored?
110. What is a nested structure?
111. What is the difference between variable declaration and variable definition?
112. What is a self-referential structure?
113. Does a built-in header file contains built-in function definition?
114. Explain modular programming.
115. What is a preprocessor?
116. Explain the use of %i format specifier w.r.t scanf().
117. How can you print a \ (backslash) using any of the printf() family of functions.
118. Does a break is required by default case in switch statement?
119. When to user -> (arrow) operator.
120. What are bit fields?
121. What are command line arguments?
122. What are the different ways of passing parameters to the functions? Which to use when?
123. What is the purpose of built-in stricmp() function.
124. Describe the file opening mode “w+”.
125. Where the address of operator (&) cannot be used?

C Interview Questions Level-6

126. Is FILE a built-in data type?
127. What is reminder for 5.0 % 2?
128. How many operators are there under the category of ternary operators?
129. Which key word is used to perform unconditional branching?
130. What is a pointer to a function? Give the general syntax for the same.
131. Explain the use of comma operator (,).
132. What is a NULL statement?
133. What is a static function?
134. Which compiler switch to be used for compiling the programs using math library with gcc compiler?
135. Which operator is used to continue the definition of macro in the next line?
136. Which operator is used to receive the variable number of arguments for a function?
137. What is the problem with the following coding snippet?
138. Which built-in library function can be used to re-size the allocated dynamic memory?
139. Define an array.
140. What are enumerations?
141. Which built-in function can be used to move the file pointer internally?
142. What is a variable?
143. What are compound statements?
144. What is the significance of an algorithm to C programming?
145. What is the advantage of an array over individual variables?
146. What is wrong in this statement? scanf(“%d”,whatnumber);
147. How do you generate random numbers in C?
148. What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
149. Who designed C programming language?
150. C is successor of which programming language?

C Interview Questions Level-7

151. What is the full form of ANSI?
152. What are comments and how do you insert it in a C program?
153. What is debugging?
154. What does the && operator do in a program code?
155. In C programming, what command or code can be used to determine if a number of odd or even?
156. What does the format %10.2 mean when included in a printf statement?
157. What are logical errors and how does it differ from syntax errors?
158. Which operator can be used to determine the size of a data type or variable?
159. Can we assign a float variable to a long integer variable?
160. Is 068 a valid octal number?
161. What are the different types of control structures in programming?
162. What is || operator and how does it function in a program?
163. What are the different file extensions involved when programming in C?
164. Can the “if” function be used in comparing strings?
165. What are preprocessor directives?
166. Why is C language being considered a middle level language?
167. Describe the order of precedence with regards to operators in C.
168. What is wrong with this statement? myName = “Robin”;
169. How do you determine the length of a string value that was stored in a variable?
170. Is it possible to initialize a variable at the time it was declared?
171. What are reserved words?
172. What it the return value of a relational operator if it returns any?
173. How does bitwise operator XOR works.
174. When is the “void” keyword used in a function?
175. Why is it that not all header files are declared in every C program?

C Interview Questions Level-8

176. Can I use “int” data type to store the value 32768? Why?
177. Can two or more operators such as \n and \t be combined in a single line of program code?
178. Can variables belonging to different scope have same name? If so show an example.
179. What is the default value of local and global variables?
180. Can a pointer access the array?
181. What are valid operations on pointers?
182. What is a string length?
183. What is the built-in function to append one string to another?
184. Which operator can be used to access union elements if union variable is a pointer variable?
185. Explain about ‘stdin’.
186. Name a function which can be used to close the file stream.
187. What is the purpose of #undef preprocessor?
188. Define a structure.
189. Name the predefined macro which be used to determine whether your compiler is ANSI standard or not?
190. What is the modulus operator?
191. Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
192. Compare and contrast compilers from interpreters.
193. How do you access the values within an array?
194. How do you declare a variable that will hold string values?
195. Can the curly brackets { } be used to enclose a single line of code?
196. What is recursion?
197. What are header files and what are its uses in C programming?
198. What is syntax error?
199. Which function can be used to release the dynamic allocated memory?
200. What is the first string in the argument vector w.r.t command line arguments?

C Interview Questions Level-9

201. What are variables and it what way is it different from constants?
202. How can we determine whether a file is successfully opened or not using fopen() function?
203. What is the output file generated by the linker.
204. What is a stack?
205. What is variable initialization and why is it important?
206. What is spaghetti programming?
207. Differentiate Source Codes from Object Codes
208. In C programming, how do you insert quote characters (‘ and “) into the output screen?
209. What is the use of a ‘\0’ character?
210. What is the difference between the = symbol and == symbol?
211. What is the default function call method?
212. Functions must and should be declared. Comment on this.
213. When the macros gets expanded?
214. Can a function return multiple values to the caller using return reserved word?
215. What is a constant pointer?
216. To make pointer generic for which date type it need to be declared?
217. Can the structure variable be initialized as soon as it is declared?
218. Is there a way to compare two structure variables?
219. Which built-in library function can be used to match a patter from the string?
220. What is difference between far and near pointers?
221. Can we nest comments in a C code?
222. What is the difference between Call by Value and Call by Reference?
223. Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
224. Which control loop is recommended if you have to execute set of statements for fixed number of times?
225. How do you construct an increment statement or decrement statement in C?

C Interview Questions Level-10

226. What is a constant?
227. Can we use just the tag name of structures to declare the variables for the same?
228. Can the main() function left empty?
229. Can one function call another?
230. Apart from Dennis Ritchie who the other person who contributed in design of C language.
231. What are linked list?
232. What is FIFO?
233. What are binary trees?
234. Not all reserved words are written in lowercase. TRUE or FALSE?
235. What is the difference between the expression “++a” and “a++”?
236. What would happen to X in this expression: X += 15; (assuming the value of X is 5)
237. In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
238. What is an endless loop?
239. What is a program flowchart and how does it help in writing a program?
240. What is wrong with this program statement? void = 10;
241. Is this program statement valid? INT = 10.50;
242. What are actual arguments?
243. What is a newline escape sequence?
244. What is output redirection?
245. What are run-time errors?
246. What is the difference between functions abs() and fabs()?
247. What are formal parameters?
248. What are control structures?
249. What are global variables and how do you declare them?
250. When is a “switch” statement preferable over an “if” statement?

C Interview Questions Level-11

251. What are enumerated types?
252. What does the function toupper() do?
253. Is it possible to have a function as a parameter in another function?
254. What are multidimensional arrays?
255. Which function in C can be used to append a string to another string?
256. What is the difference between functions getch() and getche()?
257. Dothese two program statements perform the same output? 1) scanf(“%c”, &letter); 2) letter=getchar()
258. What are structure types in C?
259. What does the characters “r” and “w” mean when writing programs that will make use of files?
260. What is the difference between text files and binary files?
261. is it possible to create your own header files?
262. What is dynamic data structure?
263. What are the different data types in C?
264. What is the general form of a C program?
265. What is the advantage of a random access file?
266. In a switch statement, what will happen if a break statement is omitted?
267. Describe how arrays can be passed to a user defined function
268. What are pointers?
269. Can you pass an entire structure to functions?
270. What is gets() function?
271. The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
272. How do you search data in a data file using random access method?
273. Are comments included during the compilation stage and placed in the EXE file as well?
274. Is there a built-in function in C that can be used for sorting data?
275. What are the advantages and disadvantages of a heap?
276. How do you convert strings to numbers in C?
277. What is the use of a semicolon (;) at the end of every program statement?