MauryaHub PYQ Practice

cs3005_2025T1_Q1_NA.pdf

Programming in C · Quiz 1 · Jan 2025

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

Question 82 MCQ · 2.0 marks

What is the role of the Program Counter (PC) in the CPU?
  1. To store the results of computations
  2. To store the address of the next instruction to execute
  3. To manage input and output operations
  4. To provide temporary data storage

A published solution is not available for this question yet.

Question 83 MCQ · 2.0 marks

What is the correct order of memory levels based on **size** (smallest to largest)?
  1. Cache Memory → Registers → Main Memory → Secondary Memory
  2. Registers → Cache Memory → Main Memory → Secondary Memory
  3. Secondary Memory → Main Memory → Cache Memory → Registers
  4. Main Memory → Cache Memory → Secondary Memory → Registers

A published solution is not available for this question yet.

Question 84 MCQ · 2.0 marks

Which of the following operators in C have right-to-left associativity?
  1. [[IMAGE:0bcd5ac9545b8858_3_2]]
    Source diagram or notation
  2. [[IMAGE:0bcd5ac9545b8858_3_3]]
    Source diagram or notation
  3. [[IMAGE:0bcd5ac9545b8858_3_4]]
    Source diagram or notation
  4. [[IMAGE:0bcd5ac9545b8858_3_5]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 85 MCQ · 4.0 marks

Consider the generalized computation given below: 1. R[0] ← M[0] 2. R[1] ← M[1] 3. R[2] = R[1] - R[0] 4. If R[2] != 0, set R[1] = R[1] + 2 and go back to step 3. Otherwise, go to step 5. 5. R[2] = R[0] + R[1] 6. M[2] ← R[2] For which value of **M[0]** and **M[1]**, the computation will enter into an **infinite loop**?
  1. M[0] = 5, M[1] = 3
  2. M[0] = 7, M[1] = 3
  3. M[0] = 8, M[1] = 2
  4. M[0] = 10, M[1] = 3

A published solution is not available for this question yet.

Question 86 MCQ · 4.0 marks

[[IMAGE:0bcd5ac9545b8858_4_6]]
Source diagram or notation
  1. Subtract values from R1 until R2 is zero
  2. Increment R1 by the sum of values from R2 to 1
  3. Multiply R1 by R2
  4. Divide R1 by R2

A published solution is not available for this question yet.

Question 87 MCQ · 4.0 marks

[[IMAGE:0bcd5ac9545b8858_5_7]]
Source diagram or notation
  1. 10
  2. 15
  3. 0
  4. 5

A published solution is not available for this question yet.

Question 88 MCQ · 4.0 marks

[[IMAGE:0bcd5ac9545b8858_6_8]]
Source diagram or notation
  1. [[IMAGE:0bcd5ac9545b8858_6_9]]
    Source diagram or notation
  2. [[IMAGE:0bcd5ac9545b8858_6_10]]
    Source diagram or notation
  3. [[IMAGE:0bcd5ac9545b8858_6_11]]
    Source diagram or notation
  4. [[IMAGE:0bcd5ac9545b8858_6_12]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 89 MCQ · 4.0 marks

[[IMAGE:0bcd5ac9545b8858_7_13]]
Source diagram or notation
  1. 12
  2. 10
  3. 15
  4. 13

A published solution is not available for this question yet.

Question 90 MCQ · 3.0 marks

Convert the binary number **10101010** to its decimal equivalent.
  1. 170
  2. 180
  3. 160
  4. 175

A published solution is not available for this question yet.

Question 91 MCQ · 3.0 marks

Convert the hexadecimal number **0x7C5D** to its equivalent decimal representation:
  1. 31835
  2. 31836
  3. 31837
  4. 31838

A published solution is not available for this question yet.

Question 92 MCQ · 3.0 marks

[[IMAGE:0bcd5ac9545b8858_8_14]]
Source diagram or notation
  1. 25
  2. 15
  3. 30
  4. 20

A published solution is not available for this question yet.

Question 93 MSQ · 3.0 marks

Which of the following is true for an 8-bit 2's complement representation?
  1. The rightmost bit represents the sign (0 for positive, 1 for negative).
  2. The maximum positive number that can be represented is 127.
  3. The minimum negative number that can be represented is -127.
  4. There are 256 possible values that can be represented.

A published solution is not available for this question yet.

Question 94 MSQ · 2.0 marks

Select all the valid variable names in C:
  1. _123Var
  2. Test-Name
  3. 1stValue
  4. break
  5. max_length

A published solution is not available for this question yet.

Question 95 NAT · 3.0 marks

Consider the generalized computation given below: 1. R[0] ← M[0] 2. R[1] ← M[1] 3. R[1] = R[1] - R[0] 4. R[0] = R[0] + R[1] 5. R[1] = R[0] - R[1] 6. M[2] ← R[1] What will be the value of M[2] at the end of computation if M[0] = 4 and M[1] = 7?

    A published solution is not available for this question yet.

    Question 96 NAT · 3.0 marks

    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 **3 operands.** ● The first operand should be able to represent **32 registers.** ● The second operand should be able to represent **-63 to 63** in signed magnitude form. ● The third operand is a single flag (**1-bit**).

      A published solution is not available for this question yet.

      Question 97 NAT · 4.0 marks

      [[IMAGE:0bcd5ac9545b8858_10_15]]
      Source diagram or notation

        A published solution is not available for this question yet.