uiz Space

September 2024 term · Programming in C · BSCS3005

Programming in C Quiz 1: 27 October 2024 (September 2024 term)

The IIT Madras BS Programming in C (Programming in C) Quiz 1 paper sat on 27 Oct 2024, in the September 2024 term: 18 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
18
Marks
50
Duration
120 min
MSQ
1
MCQ
10
Numerical
7

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 27 Oct 2024 · No negative marking.

Question 1

+2 marksOne or more correct options

Select all the correct statements from the below.

Select all that apply.

  1. A

    RAM is volatile memory

  2. B

    ROM is faster than RAM

  3. C

    Hard drives provide non-volatile storage

  4. D

    CPU cache is slower than main memory

Show answer

Correct answers

  • A

    RAM is volatile memory

  • C

    Hard drives provide non-volatile storage

Question 2

+2 marksOne correct option

Convert the following hexadecimal number to its equivalent binary representation.
B5E9

  1. A

    1011 0101 1110 1000

  2. B

    1101 0101 1110 1001

  3. C

    1011 0101 1110 1001

  4. D

    1011 0111 1110 1001

Show answer

Correct answer

  • C

    1011 0101 1110 1001

Question 3

+2 marksOne correct option
  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • B

    4

Question 4

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

Correct answer

  • A

Question 5

+3 marksOne correct option

Find the Hexadecimal representation of the word “CAT” in ASCII.
Hint: A - 65(decimal), B - 66, … in ASCII.

  1. A

    0x43 0x41 0x54

  2. B

    0x42 0x40 0x53

  3. C

    0x43 0x61 0x54

  4. D

    0x42 0x41 0x53

Show answer

Correct answer

  • A

    0x43 0x41 0x54

Question 6

+3 marksOne correct option

Which of the following expression represent the order in which the expression 8 - 2 * 3 + 4 / 2 is evaluated in C?

  1. A

    (8 - 2) * (3 + (4 / 2))

  2. B

    8 - (2 * 3) + (4 / 2)

  3. C

    ((8 - 2) * 3) + (4 / 2)

  4. D

    8 - (2 * (3 + 4) / 2)

Show answer

Correct answer

  • B

    8 - (2 * 3) + (4 / 2)

Question 7

+3 marksOne correct option
  1. A

    H

  2. B

    g

  3. C

    E

  4. D

    f

Show answer

Correct answer

  • A

    H

Question 8

+3 marksOne correct option
  1. A

    121

  2. B

    131

  3. C

    120

  4. D

    231

Show answer

Correct answer

  • B

    131

Question 9

+3 marksOne correct option
  1. A

    ac

  2. B

    c

  3. C

    bd

  4. D

    d

Show answer

Correct answer

  • B

    c

Question 10

+4 marksOne correct option

Find the minimum number of bits required to represent an instruction set where there are 16 unique instructions and each instruction can take at most 2 operands.
Assume the first operand should be able to represent 32 registers and the second operand should be able to represent -63 to 63 in signed magnitude form.

  1. A

    16

  2. B

    17

  3. C

    18

  4. D

    19

Show answer

Correct answer

  • A

    16

Question 11

+4 marksOne correct option
  1. A

    4

  2. B

    5

  3. C

    6

  4. D

    7

Show answer

Correct answer

  • C

    6

Question 12

+2 marksNumerical answer
Show answer

Correct answer: -1

Question 13

+2 marksNumerical answer

What is the minimum number of bits needed to represent -6 to 7 using signed magnitude representation?

Show answer

Correct answer: 4

Question 14

+2 marksNumerical answer
Show answer

Correct answer: 20

Question 15

+2 marksNumerical answer
Show answer

Correct answer: 2

Question 16

+3 marksNumerical answer
Show answer

Correct answer: 38

Question 17

+3 marksNumerical answer
Show answer

Correct answer: 40

Question 18

+4 marksNumerical answer
Show answer

Correct answer: 9