Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
Programming in C
End Term · 31 Aug 2025 (Forenoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ4 Marks·Choose one option

- APre-increment changes the value after the expression is evaluated, while post- increment changes it before the expression is evaluated.
- BPre-increment changes the value before the expression is evaluated, while post-increment changes it after the expression is evaluated.
- CPre-increment is used with integers, while post-increment is used with floating-point numbers.
- DPre- and Post-increment are identical in operation. They are two ways of writing the same statement.
- Q2MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MCQ4 Marks·Choose one option
When a recursive function is called, how does the call stack (or program stack) manage the function calls?
- AEach new recursive call overwrites the previous function call on the stack.
- BEach new recursive call adds a new stack frame to the top of the stack for its local variables and parameters.
- CThe call stack is not used for recursive functions; a separate data structure is used.
- DThe recursive calls are stored in a queue, waiting to be processed in order.
- Q4MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q5MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q6MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q7MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q8MCQ4 Marks·Choose one option

- A10
- B20
- C30
- D40
- Q9MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q10MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q11MCQ4 Marks·Choose one option
A special data type is declared where multiple members share the same memory location. The size of an instance of this type is equal to the size of its largest member. What kind of data type is this?
- A

- B

- C

- D

- A
- Q12MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q13MCQ4 Marks·Choose one option
In C programming, which memory region is primarily used for storing local variables of functions and function call information?
- AHeap memory
- BStack memory
- CStatic memory
- DCode segment
- Q14MCQ4 Marks·Choose one option

- A"New Content" is appended to the end, resulting in "Hello WorldNew Content".
- BThe file is cleared, and only "New Content" is written.
- CThe code will fail to open the file because it already exists.
- D"New Content" is inserted at the beginning, pushing "Hello World" to the end.
- Q15MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q16MCQ4 Marks·Choose one option
What is the primary purpose of the C preprocessor?
- ATo execute the program's logic before the main function.
- BTo convert the source code into machine language.
- CTo process directives and modify the source code before compilation.
- DTo manage dynamic memory allocation during runtime.
- Q17MCQ4 Marks·Choose one option

- A25
- B23
- C17
- D15
- Q18MCQ4 Marks·Choose one option

- A7
- B104
- C4
- D5
- Q19MCQ5 Marks·Choose one option

- A2 4 6 8
- B2 4 6 8 10
- CInfinite loop
- D2 4 6 8 10 12
- Q20MCQ5 Marks·Choose one option

- A0501
- B150
- C501
- D1050
- Q21NAT5 Marks·Write the number
Your answer: - Q22NAT5 Marks·Write the number
Your answer: - Q23NAT4 Marks·Write the number
Your answer: - Q24NAT4 Marks·Write the number
Your answer: