uiz Space

May 2025 term · Programming in C · BSCS3005

Programming in C Quiz 1: 13 July 2025 (May 2025 term)

The IIT Madras BS Programming in C (Programming in C) Quiz 1 paper sat on 13 Jul 2025, in the May 2025 term: 17 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
17
Marks
50
Duration
120 min
MCQ
10
MSQ
3
Numerical
4

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 13 July 2025 · No negative marking.

Question 1

+2 marksOne correct option

Select the correct statement about peripherals in a computer.

  1. A

    CPU reads the values from the peripherals by reading the value at the memory address mapped to them.

  2. B

    CPU has separate instructions for performing read and write from a peripheral.

  3. C

    CPU cannot read the values from the peripherals

  4. D

    There is a standard and fixed memory mappings for each input device.

Show answer

Correct answer

  • A

    CPU reads the values from the peripherals by reading the value at the memory address mapped to them.

Question 2

+2 marksOne correct option

Identify the option that arranges the following memory types in typical descending order of size (from largest to smallest).

  1. A

    Main Memory (RAM), Secondary Memory (Hard Drive), Cache Memory, Registers

  2. B

    Main Memory (RAM), Secondary Memory (Hard Drive), Registers, Cache Memory

  3. C

    Secondary Memory (Hard Drive), Main Memory (RAM), Cache Memory, Registers

  4. D

    Secondary Memory (Hard Drive), Registers, Main Memory (RAM), Cache Memory

Show answer

Correct answer

  • C

    Secondary Memory (Hard Drive), Main Memory (RAM), Cache Memory, Registers

Question 3

+2 marksOne correct option

Which of the following best describes the C programming language?

  1. A

    High-level, object-oriented, interpreted

  2. B

    High-level, unstructured, compiled

  3. C

    Mid-level, structured, compiled

  4. D

    Low-level, procedural, interpreted

Show answer

Correct answer

  • C

    Mid-level, structured, compiled

Question 4

+2 marksOne correct option
  1. A

    109

  2. B

    101

  3. C

    117

  4. D

    93

Show answer

Correct answer

  • A

    109

Question 5

+4 marksOne correct option

Consider the computations given below using the generalized memory model.
1. M[0] ← x
2. M[1] ← y
3. M[2] ← M[0] * M[0]
4. M[3] ← M[1] * M[1]
5. M[4] ← 2 * M[0] * M[1]
6. M[5] ← M[2] + M[4]
7. M[6] ← M[3] - M[4]
8. M[6] ← M[5] + M[6]
What is the value of M[6] at the end of the execution?

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

Correct answer

  • A

Question 6

+4 marksOne correct option
  1. A

    3

  2. B

    5

  3. C

    6

  4. D

    4

Show answer

Correct answer

  • B

    5

Question 7

+3 marksOne correct option

A CPU architecture features an instruction set with 30 unique instructions. Each instruction consistently uses three operands. Every operand needs to address any of 256 distinct general- purpose registers. What is the minimum number of bits necessary to encode one such instruction?

  1. A

    28

  2. B

    29

  3. C

    30

  4. D

    26

Show answer

Correct answer

  • B

    29

Question 8

+3 marksOne correct option
  1. A

    250

  2. B

    -6

  3. C

    -5

  4. D

    6

Show answer

Correct answer

  • B

    -6

Question 9

+3 marksOne correct option
  1. A

    a = 10, b = 14, c = 25, d = 35

  2. B

    a = 11, b = 14, c = 23, d = 34

  3. C

    a = 10, b = 14, c = 23, d = 34

  4. D

    a = 10, b = 14, c = 24, d = 35

Show answer

Correct answer

  • A

    a = 10, b = 14, c = 25, d = 35

Question 10

+3 marksOne correct option
  1. A

    10 4 5

  2. B

    2 0 2

  3. C

    5 4 5

  4. D

    2 4 5

Show answer

Correct answer

  • D

    2 4 5

Question 11

+3 marksOne or more correct options

Select all that apply.

  1. A

    128 in unsigned representation

  2. B

    -128 in 2’s complement representation

  3. C

    128 in 2’s complement representation

  4. D

    -1 in 1’s complement representation

Show answer

Correct answers

  • A

    128 in unsigned representation

  • B

    -128 in 2’s complement representation

Question 12

+3 marksOne or more correct options

Select all that apply.

  1. A

    a=12, b=10, c=5

  2. B

    a=15, b=9, c=10

  3. C

    a=8, b=6, c=10

  4. D

    a=10, b=5, c=7

Show answer

Correct answers

  • C

    a=8, b=6, c=10

  • D

    a=10, b=5, c=7

Question 13

+2 marksOne or more correct options

Which of the following is/are valid C variable names?

Select all that apply.

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

Correct answers

  • A
  • C
  • D

Question 14

+4 marksNumerical answer
Show answer

Correct answer: 12

Question 15

+4 marksNumerical answer
Show answer

Correct answer: 10

Question 16

+3 marksNumerical answer
Show answer

Correct answer: 27

Question 17

+3 marksNumerical answer
Show answer

Correct answer: 24