0% found this document useful (0 votes)
4 views

24CBDS11- Programming in C-Question Bank

The document outlines the syllabus for a Programming in C course at VELS Institute, detailing various topics and questions for assessment. It includes sections on programming fundamentals, control structures, data types, functions, structures, and preprocessor directives, among others. The document serves as a comprehensive guide for students to understand the course expectations and content.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

24CBDS11- Programming in C-Question Bank

The document outlines the syllabus for a Programming in C course at VELS Institute, detailing various topics and questions for assessment. It includes sections on programming fundamentals, control structures, data types, functions, structures, and preprocessor directives, among others. The document serves as a comprehensive guide for students to understand the course expectations and content.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

VELS INSTITUTE OF SCIENCE, TECHNOLOGY AND ADVANCED

STUDIES

DEPARTMENT: BCA/IT
SEMESTER: I
TITLE OF THE COURSE: Programming in C
COURSE CODE: 24CBDS11
TIME: 03 Hours Max. Marks: 100

SECTION – A (3 MARKS)
S. No Questions Unit K-Level CO PO
What is a programming language? Explain the I 2 1 1
1.
difference between high-level and low-level
languages.
2. What is C programming? Why is C considered a I 2 1 1
middle-level language?
3. Define algorithm. How is it related to I 2 1 1
programming?
4. What is the importance of a compiler in C I 2 1 1
programming?
5. What is the difference between a compiler and I 2 1 1
an interpreter?
6. What are the basic building blocks of a C I 2 1 1
program?
7. Define syntax in C programming. Why is it I 2 1 1
important?
8. What is the role of the main() function in C I 2 1 1
programs?
9. Explain the use of the printf() function in C I 2 1 1
programming.
10. What are variables in C? How do you declare I 2 1 1
and initialize them?
11. What are the different data types in C? Explain I 2 1 1
with examples.
12. What is typecasting in C? Differentiate between I 2 1 1
implicit and explicit typecasting.
13. Define control structures in C. Explain with an I 2 1 1
example.
14. What is an array in C? How do you declare and I 2 1 1
access an array element?
15. What are functions in C? How do you declare I 2 1 1
and define a function?
16. What is recursion in C? Explain with an I 2 1 1
example.
17. Define pointer in C. How does it differ from a I 2 1 1
regular variable?
18. What is a structure in C? How is it used to group I 2 1 1
data?
19. What is a constant in C? Explain with an I 2 1 1
example.
20. What are header files in C? Why are they used in I 2 1 1
programs?
21. What are control structures in C? Explain their II 2 1 1
role in programming.
22. Define conditional statements in C. Explain the II 2 1 1
use of the if statement with an example.
23. What is an else-if ladder? Provide an example of II 2 1 1
how it is used in C.
24. Explain the switch-case control structure. When II 2 1 1
should it be preferred over if-else?
25. What is the break statement in C? Explain how it II 2 1 1
is used in loops and switch statements.
26. Discuss the purpose of the continue statement in II 2 1 1
C with an example.
27. What is the goto statement in C? Explain its II 2 1 1
usage and drawbacks.
28. What is the difference between while and do- II 2 1 1
while loops in C? Provide examples of both.
29. Explain how a for loop works in C. Provide a II 2 1 1
basic example.
30. Discuss the use of nested loops in C. Provide an II 2 1 1
example where nested loops are used.
31. What is the purpose of the else statement in C? II 2 1 1
How is it used in conjunction with if statements?
32. Explain the concept of infinite loops in C. How II 2 1 1
can they be avoided?
What is a logical operator? Explain how logical II 2 1 1
33.
operators like && and || are used in control
structures.
34. What is the role of relational operators in II 2 1 1
conditional statements in C? Provide examples.
How can multiple conditions be tested in a single II 2 1 1
35.
if statement in C? Use logical operators for
illustration.
36. What is a multi-way branch? Discuss how the II 2 1 1
switch statement handles multiple conditions.
37. What is short-circuit evaluation in C? Provide an II 2 1 1
example where short-circuiting is useful.
38. Explain the use of a break in a switch statement. II 2 1 1
What happens if it is omitted?
How can you control the flow of execution using II 2 1 1
39.
loops and conditionals to solve a real-world
problem?
40. What is the difference between a for loop and a II 2 1 1
while loop in terms of their usage and flexibility?
41. What is a structure in C? Explain its purpose and III 2 1 1
usage.
42. Define union in C. How does it differ from a III 2 1 1
structure?
43. How do you define a structure in C? Provide an III 2 1 1
example of a structure definition.
44. Explain how to access members of a structure in III 2 1 1
C. Provide an example.
45. What is the syntax for declaring a structure III 2 1 1
variable in C?
46. How do you initialize a structure in C? Provide III 2 1 1
an example.
47. Explain the concept of nested structures in C. III 2 1 1
Provide an example of their usage.
48. What is a structure pointer in C? How do you III 2 1 1
access structure members using pointers?
49. What is the size of operator in C? How is it used III 2 1 1
with structures?
50. What are the limitations of using unions in C? III 2 1 1
Explain with an example.
51. Explain memory allocation in structures and III 2 1 1
unions. How does memory differ between them?
52. What is the role of typedef in C structures? How III 2 1 1
can it simplify code?
How do you pass a structure to a function in C? III 2 1 1
53.
Discuss both pass-by-value and pass-by-
reference.
54. What is a structure array in C? Provide an III 2 1 1
example of how to define and use it.
55. What is a union array in C? How does it differ III 2 1 1
from a structure array?
56. How can structures and unions be used together III 2 1 1
in C? Explain with an example.
57. What happens if you assign a structure to another III 2 1 1
structure in C? Does it work by default?
58. What is the use of -> operator when working III 2 1 1
with pointers to structures? Provide an example.
59. Explain the alignment and padding in structures III 2 1 1
and unions. How do they affect memory usage?
60. How do unions save memory compared to III 2 1 1
structures in C? Explain with an example.
61. What is a preprocessor directive in C? Explain IV 2 1 1
its role in the compilation process.
62. Define the #include directive in C. How is it IV 2 1 1
used to include header files in a program?
63. What is the difference between #include IV 2 1 1
<filename> and #include "filename"?
64. What is a macro in C? Explain how it is defined IV 2 1 1
and used with an example.
65. Discuss the purpose of the #define directive. IV 2 1 1
How is it used to define constants?
66. What are the advantages of using macros over IV 2 1 1
variables in C?
67. Explain the concept of macro parameters with an IV 2 1 1
example.
68. What is the purpose of the #undef directive? IV 2 1 1
How is it used in C programming?
69. What is conditional compilation? Explain how IV 2 1 1
#if, #ifdef, #ifndef, and #endif are used.
70. Explain the #else and #elif directives. How do IV 2 1 1
they relate to #if in conditional compilation?
71. What is the #pragma directive in C? Discuss its IV 2 1 1
purpose with an example.
72. How do you create a multi-line macro in C? IV 2 1 1
Provide an example.
73. What is the #line directive used for in C IV 2 1 1
programming?
74. Explain the #error directive. How is it used for IV 2 1 1
debugging in C?
75. What is the #warning directive in C? How does it IV 2 1 1
help during compilation?
76. How do preprocessor directives affect code IV 2 1 1
portability?
77. Explain the use of #ifdef and #ifndef with an IV 2 1 1
example of conditional compilation.
78. What is the purpose of the #include directive IV 2 1 1
with angle brackets vs. double quotes?
79. What is the function of the #define directive in IV 2 1 1
controlling constants and macros?
80. How can preprocessor directives optimize code IV 2 1 1
in C? Provide examples of their use.
81. What is modular programming in C? Explain its V 2 1 1
benefits for large projects.
82. What is the importance of using meaningful V 2 1 1
variable names in C programming?
83. Define commenting in C. Why is it important for V 2 1 1
code readability and maintenance?
84. Explain the importance of indentation and V 2 1 1
consistent formatting in C programming.
What are the advantages of using constants in C? V 2 1 1
85.
How does it improve code readability and
maintenance?
86. What is the purpose of function prototypes in C? V 2 1 1
Explain their role in enhancing code clarity.
87. Why is it necessary to check for errors in system V 4 1 1
calls or functions?
88. Why should global variables be avoided in C V 4 1 1
programming? Provide reasons and alternatives.
89. List out importance of using appropriate data V 2 1 1
types in C for better memory management.
90. What is the use of const keyword in C? V 2 1 1

91. Why is it important to initialize variables before V 4 1 1


using them in C programming?
92. What is the importance of using functions in C? V 2 1 1

93. List out the features of concept of pass-by-value V 2 1 1


and pass-by-reference in C.
94. What are the advantages of using loops V 2 1 1
effectively in C programming?
95. What is the use of Break statement? V 2 1 1

96. What is the role of memory management in C? V 2 1 1

97. Why should size of be used for array sizes V 4 1 1


instead of hardcoding the size in C programs?
98. What is defensive programming in C? V 2 1 1

99. List any two of the best practices for using V 2 1 1


header files in C programming
100. What is the role of debugging and testing in C V 2 1 1
programming?

SECTION – B (8 MARKS)
S.No Questions Unit K Level CO PO
101. What is the purpose of the main () function in a C I 3 2 2
program?
102. Explain the structure of a basic C program with the I 3 2 2
necessary components.
103. What is the significance of the #include directive in I 3 2 2
C programming?
104. What is the difference between a compiler and an I 3 2 2
interpreter in the context of C programming?
105. Brief the necessary to use header files in C? Provide I 3 2 2
an example.
106. Describe the role of the printf () function in C. How I 3 2 2
does it display output to the user?
107. What is a function in C? Explain the difference I 3 2 2
between a function declaration, definition, and
function call.
108. What is the significance of function prototypes in I 3 2 2
C? Why are they used?
109. What is the difference between pass-by-value and I 3 2 2
pass-by-reference in C? Provide an example of
each.
110. Explain how recursion works in C with an example I 3 2 2
of a recursive function.
111. What is a return value in a function? Why is it I 3 2 2
important in C?
112. Describe the concept of function overloading in C. I 3 2 2
Can functions be overloaded in C?
113. What is recursion? How does it differ from iteration in I 3 2 2
C?
114. How can recursion be used to solve a problem like I 3 2 2
calculating the factorial of a number in C?
115. What are the base case and recursive case in I 3 2 2
recursion?
116. What are the advantages and disadvantages of I 3 2 2
recursion in C?
117. What are control structures in C? Explain the role of II 3 2 2
if, if-else, and else-if statements with examples.
118. Explain the syntax and use of the switch-case II 3 2 2
statement in C. Provide a practical example of its
use.
119. What is the difference between if-else and switch- II 3 2 2
case statements in C? In which cases should one be
preferred over the other?
120. What is a loop in C? Explain the for, while, and do- II 3 2 2
while loops with examples of each.
121. Explain the break statement in C. How is it used to II 3 2 2
exit a loop or a switch-case statement? Provide
examples.
122. What is the continue statement in C? Discuss its II 3 2 2
usage in loops with an example.
123. What is the goto statement in C? Explain its syntax II 3 2 2
and usage with examples, including its advantages
and disadvantages.
124. What are nested control structures in C? Explain the II 3 2 2
concept of nested if statements, for loops, and
switch statements with examples.
125. What is the purpose of the else statement in C? II 3 2 2
Discuss its functionality in combination with if
statements, and provide examples.
126. What is an infinite loop in C? Explain with an II 3 2 2
example and discuss how to avoid it.
127. Explain the difference between while and do-while II 3 2 2
loops in C. In which scenarios is a do-while loop
preferred over a while loop?
128. What is the role of logical operators (like &&, ||, !) II 3 2 2
in control structures? Provide examples of their
usage in conditions.
129. How do you handle multiple conditions in a single II 3 2 2
if statement using logical operators? Provide an
example.
130. Explain the concept of short-circuit evaluation in C II 3 2 2
with examples using logical operators && and ||.
131. What is the switch statement's fall-through II 3 2 2
behavior? Explain how it works and how to prevent
it using break.
132. How would you implement a menu-driven program II 3 2 2
using switch-case in C?
133. What is a structure in C? Explain how a structure is III 3 2 2
defined and initialized with an example.
134. What is the difference between structures and arrays III 3 2 2
in C? Provide examples to illustrate the differences.
135. How do you access members of a structure in C? III 3 2 2
Provide examples using both the dot operator and
the arrow operator for structure pointers.
136. List out the limitations of Structures in C III 3 2 2
137. What is the primary difference between structures III 3 2 2
and unions in C?
138. How do you initialize a structure in C? III 3 2 2
139. Explain the concept of nested structures in C. III 3 2 2
140. Describe: Bit fields in structures in C III 3 2 2
141. How do you declare and use an array of structures III 3 2 2
in C?
142. How does it simplify the use of structures in C? III 3 2 2
143. How does memory allocation differ between III 3 2 2
structures and unions in C?
144. Explain the concept of passing structures to III 3 2 2
functions in C.
145. How can you return a structure from a function in III 3 2 2
C?
146. Describe: Structure pointer in C III 3 2 2
147. What is the use of the size of operator with III 3 2 2
structures and unions?
148. How are unions used to save memory in C III 3 2 2
programs?
149. Describe the role of preprocessor directives in the IV 3 2 2
compilation process.
150. What is the #define directive in C? Provide IV 3 2 2
examples.
151. Explain the difference between #include IV 3 2 2
<filename> and #include "filename" in C.
152. Describe the purpose of #ifdef, #ifndef, #else, and IV 3 2 2
#endif in C?
153. List out the use of the #pragma directive in C? IV 3 2 2
154. Describe the role of the #undef directive in C? IV 3 2 2
155. What is a linked list in C? Explain its structure, types IV 3 2 2
(singly, doubly), and the advantages over arrays.
156. How do you implement insertion and deletion IV 3 2 2
operations in a linked list in C? Provide examples
for both operations.
157. What is a circular linked list? How does it differ IV 3 2 2
from a regular linked list? Provide an example
implementation.
158. Explain how to traverse a linked list in C. Provide IV 3 2 2
an example of printing all elements of a singly
linked list.
159. Describe the properties, operations Push and PoP IV 3 2 2
160. Write the code examples for basic stack operations IV 3 2 2
PUSH and POP
161. List out the properties and the difference between IV 3 2 2
FIFO and LIFO order.
162. Describe the importance of debugging and the IV 3 2 2
common debugging techniques used in C.
163. Write the procedure for a circular queue IV 3 2 2
164. List out the properties and the difference between IV 3 2 2
FIFO and LIFO order.
165. Briefing how breaking a program into smaller, V 3 2 2
manageable functions can improve code readability
and reusability.
166. List the potential issues caused by uninitialized V 3 2 2
variables with examples.
167. How naming conventions enhance code clarity. V 3 2 2
168. What is the purpose of using constants and #define V 3 2 2
directives in C?
169. How should comments be used to enhance code V 3 2 2
readability without cluttering the code?
170. Why should global variables be avoided or V 3 2 2
minimized in C?
171. How validating inputs and checking for errors can V 3 2 2
prevent bugs in C programs.
172. List an example of error handling in file operations V 3 2 2
or system calls.
173. How proper formatting improves code readability V 3 2 2
and maintenance.
174. What are some best practices for naming functions V 3 2 2
and variables in C to ensure code clarity and
consistency?
175. How using constants or #define can make code V 3 2 2
more understandable and maintainable?
176. How do they enhance code structure and improve V 3 2 2
readability?
177. What is the role of header files in C programming? V 3 2 2
178. What are the benefits of using typedef in C? V 3 2 2
179. Why should goto statements be avoided in C V 3 2 2
programming?
180. What are the key steps involved in planning a mini V 3 2 2
project in C?
SECTION – C (15 MARKS)
S. No Questions Unit K CO PO
Level
181. Explain the concept of functions in C programming. I 4 3 4
182. How are arrays declared and initialized in C? I 5 3 4
Explain
183. What is recursion in C? Explain how recursion I 4 3 4
works with an example of a recursive function
184. Explain the significance of the return statement in C I 4 3 4
functions.
185. Explain the different types of operators in C. I 5 3 4

186. Write any example program for reading strings, I 4 3 4


integers, and floating-point numbers.
187. What are expressions in C? Explain I 4 3 4

188. Explain the difference between pre-increment (++i) I 5 3 4


and post-increment (i++) operators in C.
189. What are control structures in C? Explain II 4 3 4

190. Explain the if, else-if, and else statements in C. II 4 3 4

191. What is a switch statement in C? Explain how the II 5 3 4


switch statement works, including its syntax and
flow control.
192. What is the difference between if-else and switch- II 4 3 4
case statements in C? Discuss the conditions under
which each is preferred, and explain the advantages
and disadvantages of both control structures.
193. Explain the for loop in C. Discuss its syntax, II 4 3 4
purpose, and how it is used for iterating over a
known number of iterations.
194. What is the while loop in C? Explain how the while II 4 3 4
loop differs from the for loop, and describe
situations where a while loop is preferred.
195. What is the do-while loop in C? Explain the II 5 3 4
difference between do-while and while loops.
196. How do the break, continue, and goto statements II 4 3 4
work in C? Discuss how these control flow
statements are used to manipulate the execution flow
in loops and conditionals.
197. What is a structure in C? Explain how structures are III 4 3 4
defined, initialized, and accessed.
198. What is the difference between a structure and an III 4 3 4
array in C? Discuss how both structures and arrays
are used to store multiple values but differ in terms
of memory allocation, data types, and access
methods. Provide examples to illustrate the
differences.
199. What is a union in C? Explain the concept of a III 5 3 4
union, how it differs from a structure, and the
memory management implications. Provide
examples of how unions are used to store different
types of data in the same memory location.
200. What are the key differences between structures and III 4 3 4
unions? Discuss how structures allocate memory for
each member
201. Explain how to pass a structure to a function in C. III 5 3 4
Discuss both pass-by-value and pass-by-reference
approaches.
202. What are bit fields in C structures? Explain how bit III 4 3 4
fields are used to allocate memory efficiently for
storing data.
203. How do you initialize and access members of a III 5 3 4
nested structure in C? Explain the concept of nested
structures
204. What is the use of typedef in structures and unions III 4 3 4
in C? Discuss how typedef simplifies complex data
types
205. What are preprocessor directives in C? Explain the IV 4 3 4
role of preprocessor directives like #define,
#include, #ifdef, #ifndef, and #endif in the C
programming language.
206. What is the purpose of the #define directive in C? IV 5 3 4
Explain how #define is used to define constants,
macros, and conditional macros.
207. Explain the concept of algorithms in C IV 4 3 4
programming. Discuss the role of algorithms in
problem-solving and software development.
208. What are the characteristics of a good algorithm? IV 4 3 4
Discuss the key properties that make an algorithm
efficient
209. Explain the role of searching algorithms? IV 4 3 4

210. Discuss the working of the binary search algorithm. IV 4 3 4

211. Explain the importance of sorting algorithms: IV 4 3 4

212. Explain the concept of Quick Sort algorithm. IV 5 3 4

213. Discuss about the coding guidelines in Programming V 4 3 4


in C
214. Explain the necessities of Documentations and V 4 3 4
Comments in programing languages
215. Explain the required guidelines to prepare a mini V 4 3 4
project Documentations
216. What are the probability consideration in Best V 4 3 4
practices of Programming in C
217. Discuss the features of Project Documentation V 5 3 4
218. Explain the coding styles in Programming in C V 4 3 4

219. Discuss the steps for developing a small projects in V 4 3 4


C
220. Discuss the advantages and Disadvantages in a real V 6 4 4
time project implementation – in Your perception

K1- Remember; K2- Understand; K3- Apply; K4- Analyze;


K5-Evaluate; K6-Create

You might also like