uiz Space

May 2024 term · Programming in C · BSCS3005

Programming in C Quiz 1: 7 July 2024 (May 2024 term)

The IIT Madras BS Programming in C (Programming in C) Quiz 1 paper sat on 7 Jul 2024, in the May 2024 term: 16 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
16
Marks
50
Duration
120 min
MSQ
2
Numerical
3
MCQ
11

Updated

Official paper: IIT M DEGREE AN EXAM QDB2 7 July 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

    Registers are the memory closest to the CPU

  2. B

    Cache can be used to store data that is not frequently accessed.

  3. C

    Main memory is faster than cache memory.

  4. D

    Main memory is slower than the registers.

Show answer

Correct answers

  • A

    Registers are the memory closest to the CPU

  • D

    Main memory is slower than the registers.

Question 2

+2 marksOne or more correct options

Select all the valid variable names in C.

Select all that apply.

  1. A

    test@3

  2. B

    test34

  3. C

    2nd_test

  4. D

    Test_3

Show answer

Correct answers

  • B

    test34

  • D

    Test_3

Question 3

+3 marksNumerical answer
Show answer

Correct answer: 2

Question 4

+3 marksOne correct option
  1. A

    Case 1: M[2] = 3, Case 2: M[2] = 2

  2. B

    Case 1: M[2] = -3, Case 2: M[2] = -2

  3. C

    Case 1: M[2] = -2, Case 2: M[2] = 3

  4. D

    Case 1: M[2] = 2, Case 2: M[2] = -3

Show answer

Correct answer

  • C

    Case 1: M[2] = -2, Case 2: M[2] = 3

Question 5

+3 marksOne correct option

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

  1. A

    0x46 0x41 0x58

  2. B

    0x45 0x41 0x57

  3. C

    0x46 0x31 0x58

  4. D

    0x44 0x31 0x57

Show answer

Correct answer

  • A

    0x46 0x41 0x58

Question 6

+3 marksOne correct option
  1. A

    -9

  2. B

    -11

  3. C

    -8

  4. D

    -10

Show answer

Correct answer

  • D

    -10

Question 7

+3 marksOne correct option
  1. A

    3

  2. B

    4

  3. C

    5

  4. D

    6

Show answer

Correct answer

  • B

    4

Question 8

+3 marksOne correct option
  1. A

    3

  2. B

    2

  3. C

    1

  4. D

    0

Show answer

Correct answer

  • D

    0

Question 9

+2 marksOne correct option

Convert the hexadecimal number 0xAC73 to its equivalent binary representation.

  1. A

    1010 1100 1111 0101

  2. B

    1100 1100 1111 0101

  3. C

    1010 1100 0111 0011

  4. D

    1010 1001 0111 0011

Show answer

Correct answer

  • C

    1010 1100 0111 0011

Question 10

+4 marksOne correct option

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

  1. A

    15

  2. B

    16

  3. C

    17

  4. D

    18

Show answer

Correct answer

  • C

    17

Question 11

+4 marksOne correct option
  1. A

    G

  2. B

    f

  3. C

    D

  4. D

    e

Show answer

Correct answer

  • A

    G

Question 12

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

Correct answer

  • A

Question 13

+4 marksOne correct option
  1. A

    231

  2. B

    221

  3. C

    120

  4. D

    241

Show answer

Correct answer

  • A

    231

Question 14

+4 marksOne correct option
  1. A

    ac

  2. B

    c

  3. C

    bd

  4. D

    d

Show answer

Correct answer

  • A

    ac

Question 15

+2 marksNumerical answer
Show answer

Correct answer: 5

Question 16

+4 marksNumerical answer
Show answer

Correct answer: 16