uiz Space

May 2025 term · Programming in C · BSCS3005

Programming in C End Term: 31 August 2025, Set QDB1 (May 2025 term)

The IIT Madras BS Programming in C (Programming in C) End Term paper sat on 31 Aug 2025, in the May 2025 term, set QDB1: 24 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
24
Marks
100
Duration
180 min
MCQ
20
Numerical
4

Updated

Official paper: IIT M DEGREE AN EXAM QDB3 31 Aug 2025 · No negative marking.

Question 1

+4 marksOne correct option
  1. A

    Pre-increment changes the value after the expression is evaluated, while post- increment changes it before the expression is evaluated.

  2. B

    Pre-increment changes the value before the expression is evaluated, while post-increment changes it after the expression is evaluated.

  3. C

    Pre-increment is used with integers, while post-increment is used with floating-point numbers.

  4. D

    Pre- and Post-increment are identical in operation. They are two ways of writing the same statement.

Show answer

Correct answer

  • B

    Pre-increment changes the value before the expression is evaluated, while post-increment changes it after the expression is evaluated.

Question 2

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 3

+4 marksOne correct option

When a recursive function is called, how does the call stack (or program stack) manage the function calls?

  1. A

    Each new recursive call overwrites the previous function call on the stack.

  2. B

    Each new recursive call adds a new stack frame to the top of the stack for its local variables and parameters.

  3. C

    The call stack is not used for recursive functions; a separate data structure is used.

  4. D

    The recursive calls are stored in a queue, waiting to be processed in order.

Show answer

Correct answer

  • B

    Each new recursive call adds a new stack frame to the top of the stack for its local variables and parameters.

Question 4

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 5

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 6

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 7

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 8

+4 marksOne correct option
  1. A

    10

  2. B

    20

  3. C

    30

  4. D

    40

Show answer

Correct answer

  • B

    20

Question 9

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 10

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 11

+4 marksOne correct 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?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 12

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 13

+4 marksOne correct option

In C programming, which memory region is primarily used for storing local variables of functions and function call information?

  1. A

    Heap memory

  2. B

    Stack memory

  3. C

    Static memory

  4. D

    Code segment

Show answer

Correct answer

  • B

    Stack memory

Question 14

+4 marksOne correct option
  1. A

    "New Content" is appended to the end, resulting in "Hello WorldNew Content".

  2. B

    The file is cleared, and only "New Content" is written.

  3. C

    The code will fail to open the file because it already exists.

  4. D

    "New Content" is inserted at the beginning, pushing "Hello World" to the end.

Show answer

Correct answer

  • B

    The file is cleared, and only "New Content" is written.

Question 15

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 16

+4 marksOne correct option

What is the primary purpose of the C preprocessor?

  1. A

    To execute the program's logic before the main function.

  2. B

    To convert the source code into machine language.

  3. C

    To process directives and modify the source code before compilation.

  4. D

    To manage dynamic memory allocation during runtime.

Show answer

Correct answer

  • C

    To process directives and modify the source code before compilation.

Question 17

+4 marksOne correct option
  1. A

    25

  2. B

    23

  3. C

    17

  4. D

    15

Show answer

Correct answer

  • D

    15

Question 18

+4 marksOne correct option
  1. A

    7

  2. B

    104

  3. C

    4

  4. D

    5

Show answer

Correct answer

  • A

    7

Question 19

+5 marksOne correct option
  1. A

    2 4 6 8

  2. B

    2 4 6 8 10

  3. C

    Infinite loop

  4. D

    2 4 6 8 10 12

Show answer

Correct answer

  • A

    2 4 6 8

Question 20

+5 marksOne correct option
  1. A

    0501

  2. B

    150

  3. C

    501

  4. D

    1050

Show answer

Correct answer

  • A

    0501

Question 21

+5 marksNumerical answer
Show answer

Correct answer: 4

Question 22

+5 marksNumerical answer
Show answer

Correct answer: 20

Question 23

+4 marksNumerical answer
Show answer

Correct answer: 26

Question 24

+4 marksNumerical answer
Show answer

Correct answer: 7