uiz Space

January 2026 term · Programming in C · BSCS3005

Programming in C End Term: 10 May 2026 (January 2026 term)

The IIT Madras BS Programming in C (Programming in C) End Term paper sat on 10 May 2026, in the January 2026 term: 23 questions for 95 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
23
Marks
95
Duration
180 min
MCQ
14
MSQ
4
Numerical
5

Updated

Official paper: Programming in C 06 May 26 · No negative marking.

Question 1

+5 marksOne correct option
  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • C

    6

Question 2

+5 marksOne correct option
  1. A

    8

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • D

    6

Question 3

+5 marksOne correct option

Consider the following C program:

What will be the output?

  1. A

    50

  2. B

    10

  3. C

    Garbage value

  4. D

    Compilation error

Show answer

Correct answer

  • B

    10

Question 4

+3 marksOne correct option

Consider the code:

What will be the value of c?

  1. A

    14

  2. B

    12

  3. C

    17

  4. D

    19

Show answer

Correct answer

  • B

    12

Question 5

+3 marksOne correct option

What is the correct way to access a structure member using a pointer to a structure?

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

Correct answer

  • B

Question 6

+3 marksOne correct option

We want to dynamically allocate memory at runtime for 10 integer elements and store the returned address in a pointer. Which of the following statements is correct?

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

Correct answer

  • A

Question 7

+3 marksOne correct option
  1. A

    Concatenates two tokens

  2. B

    Compares two tokens

  3. C

    Excludes a token

  4. D

    Multiplies two tokens

Show answer

Correct answer

  • A

    Concatenates two tokens

Question 8

+4 marksOne correct option

Consider the following C program:

What will be the output?

  1. A

    15

  2. B

    10

  3. C

    5

  4. D

    Garbage value

Show answer

Correct answer

  • C

    5

Question 9

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

Correct answer

  • D

Question 10

+4 marksOne correct option

Consider the following code:

What will be the output?

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

Correct answer

  • D

Question 11

+4 marksOne correct option

What will be the output of the given code?

  1. A

    1 3 4 5

  2. B

    0 3 3 4

  3. C

    0 1 2 3

  4. D

    0 3 4 5

Show answer

Correct answer

  • D

    0 3 4 5

Question 12

+4 marksOne correct option
  1. A
  2. B

    (A figure from the original paper is missing from the source site.)

  3. C
  4. D
Show answer

Correct answer

  • A

Question 13

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

Correct answer

  • C

Question 14

+4 marksOne correct option

Consider the C program below.

What will be the output of the above C program?

  1. A

    63

  2. B

    45

  3. C

    27

  4. D

    14

Show answer

Correct answer

  • C

    27

Question 15

+5 marksOne or more correct options

Consider the following C program:

Which of the following statements are correct?

Select all that apply.

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

Correct answers

  • B
  • C

Question 16

+4 marksOne or more correct options

Which of the following statements about arrays in C are correct?

Select all that apply.

  1. A

    Array elements are stored in contiguous memory locations.

  2. B

    Array size can be changed after declaration.

  3. C

    The array name acts like a pointer to the first element in most expressions.

  4. D

    Arrays can store elements of different data types.

  5. E

    Array indexing starts from 0.

Show answer

Correct answers

  • A

    Array elements are stored in contiguous memory locations.

  • C

    The array name acts like a pointer to the first element in most expressions.

  • E

    Array indexing starts from 0.

Question 17

+4 marksOne or more correct options

Select all that apply.

  1. A
  2. B

    All members share the same memory location

  3. C

    Each member has its own separate memory

  4. D

    Only one member can hold a valid value at a time

Show answer

Correct answers

  • B

    All members share the same memory location

  • D

    Only one member can hold a valid value at a time

Question 18

+3 marksOne or more correct options

Which of the following file modes delete the existing content of a file when opened?

Select all that apply.

  1. A

    "w"

  2. B

    "w+"

  3. C

    "r+"

  4. D

    "a"

Show answer

Correct answers

  • A

    "w"

  • B

    "w+"

Question 19

+5 marksNumerical answer

Consider the following computation steps:
1. R[0] = 2 2. R[1] = 3 3. R[1] = R[1] + R[0] 4. R[0] = R[0] + 1 5. If R[0] ≤ 5 go to step-3, otherwise, go to step-6 6. R[2] = R[1]
What is the final value of R[2] at the end of computation?

Show answer

Correct answer: 17

Question 20

+5 marksNumerical answer

Consider the following C program:

What will be the output printed on the screen?

Show answer

Correct answer: 24

Question 21

+5 marksNumerical answer

Consider the following C program:

What will be the output printed on the screen?

Show answer

Correct answer: 30

Question 22

+5 marksNumerical answer

Consider the following C code:

What will be the output?

Show answer

Correct answer: 18

Question 23

+4 marksNumerical answer

Consider the following C code snippet. What will be the output?

Show answer

Correct answer: 7