cs3005_2025T2_Q1_NA.pdf
Programming in C · Quiz 1 · May 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 77 MCQ · 2.0 marks
Select the correct statement about peripherals in a computer.
CPU reads the values from the peripherals by reading the value at the memory
address mapped to them.
CPU has separate instructions for performing read and write from a
peripheral.
CPU cannot read the values from the peripherals
There is a standard and fixed memory mappings for each input device.
A published solution is not available for this question yet.
Question 78 MCQ · 2.0 marks
Identify the option that arranges the following memory types in **typical** descending order of size
(from largest to smallest).
Main Memory (RAM), Secondary Memory (Hard Drive), Cache Memory,
Registers
Main Memory (RAM), Secondary Memory (Hard Drive), Registers, Cache
Memory
Secondary Memory (Hard Drive), Main Memory (RAM), Cache Memory,
Registers
Secondary Memory (Hard Drive), Registers, Main Memory (RAM), Cache
Memory
A published solution is not available for this question yet.
Question 79 MCQ · 2.0 marks
Which of the following best describes the C programming language?
High-level, object-oriented, interpreted
High-level, unstructured, compiled
Mid-level, structured, compiled
Low-level, procedural, interpreted
A published solution is not available for this question yet.
Question 80 MCQ · 2.0 marks
[[IMAGE:a6e0b081d9be538c_3_1]]

109
101
117
93
A published solution is not available for this question yet.
Question 81 MCQ · 4.0 marks
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?
[[IMAGE:a6e0b081d9be538c_4_2]]

[[IMAGE:a6e0b081d9be538c_4_3]]

[[IMAGE:a6e0b081d9be538c_4_4]]

[[IMAGE:a6e0b081d9be538c_4_5]]

A published solution is not available for this question yet.
Question 82 MCQ · 4.0 marks
[[IMAGE:a6e0b081d9be538c_5_6]]

3
5
6
4
A published solution is not available for this question yet.
Question 83 MCQ · 3.0 marks
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?
28
29
30
26
A published solution is not available for this question yet.
Question 84 MCQ · 3.0 marks
[[IMAGE:a6e0b081d9be538c_6_7]]

250
-6
-5
6
A published solution is not available for this question yet.
Question 85 MCQ · 3.0 marks
[[IMAGE:a6e0b081d9be538c_6_8]]

a = 10, b = 14, c = 25, d = 35
a = 11, b = 14, c = 23, d = 34
a = 10, b = 14, c = 23, d = 34
a = 10, b = 14, c = 24, d = 35
A published solution is not available for this question yet.
Question 86 MCQ · 3.0 marks
[[IMAGE:a6e0b081d9be538c_7_9]]

10 4 5
2 0 2
5 4 5
2 4 5
A published solution is not available for this question yet.
Question 87 MSQ · 3.0 marks
[[IMAGE:a6e0b081d9be538c_7_10]]

128 in unsigned representation
-128 in 2’s complement representation
128 in 2’s complement representation
-1 in 1’s complement representation
A published solution is not available for this question yet.
Question 88 MSQ · 3.0 marks
[[IMAGE:a6e0b081d9be538c_8_11]]

a=12, b=10, c=5
a=15, b=9, c=10
a=8, b=6, c=10
a=10, b=5, c=7
A published solution is not available for this question yet.
Question 89 MSQ · 2.0 marks
Which of the following is/are valid C variable names?
[[IMAGE:a6e0b081d9be538c_8_12]]

[[IMAGE:a6e0b081d9be538c_8_13]]

[[IMAGE:a6e0b081d9be538c_8_14]]

[[IMAGE:a6e0b081d9be538c_8_15]]

[[IMAGE:a6e0b081d9be538c_8_16]]

A published solution is not available for this question yet.
Question 90 NAT · 4.0 marks
[[IMAGE:a6e0b081d9be538c_9_17]]

A published solution is not available for this question yet.
Question 91 NAT · 4.0 marks
[[IMAGE:a6e0b081d9be538c_10_18]]

A published solution is not available for this question yet.
Question 92 NAT · 3.0 marks
[[IMAGE:a6e0b081d9be538c_11_19]]

A published solution is not available for this question yet.
Question 93 NAT · 3.0 marks
[[IMAGE:a6e0b081d9be538c_12_20]]

A published solution is not available for this question yet.