cs3005_2024T1_Q1_NA.pdf
Programming in C · Quiz 1 · Jan 2024
← 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 58 MCQ · 2.0 marks
Which of the following components temporarily stores data and instructions that are **frequently**
requested?
ALU (Arithmetic Logic Unit)
Cache Memory
Control Unit
RAM
A published solution is not available for this question yet.
Question 59 MCQ · 2.0 marks
Which type of memory is typically used for storage of BIOS (Basic Input/Output System) firmware
in a computer?
Cache Memory
RAM (Random Access Memory)
ROM (Read-Only Memory)
Registers
A published solution is not available for this question yet.
Question 60 MCQ · 3.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 61 MCQ · 3.0 marks
Consider the signed integer -4 is represented with 4 bits in signed magnitude form. If the same 4
bits are interpreted as an unsigned integer, what will be the value of the unsigned integer in
decimal?
4
14
12
5
A published solution is not available for this question yet.
Question 62 MCQ · 3.0 marks
The number of '1's present in the binary form of the hexadecimal number 0xE5F7 is ___?
4
8
12
16
A published solution is not available for this question yet.
Question 63 MCQ · 3.0 marks
Assume the digits from 0 to 9 are encoded as characters. The even digits are mapped from 0 to 4
in ascending order, and the odd digits are mapped from 5 to 9 in the descending order. What is
the mapping for the digit "7" with respect to the above encoding?
4
6
7
8
A published solution is not available for this question yet.
Question 64 MCQ · 3.0 marks
[[IMAGE:1a594c2b328ed055_6_1]]

[[IMAGE:1a594c2b328ed055_6_2]]

[[IMAGE:1a594c2b328ed055_6_3]]

[[IMAGE:1a594c2b328ed055_6_4]]

[[IMAGE:1a594c2b328ed055_6_5]]

A published solution is not available for this question yet.
Question 65 MCQ · 3.0 marks
Select the correct statement about the sizes of the different data types in C.
sizeof(char) >= sizeof(double)
sizeof(int) >= sizeof(float)
sizeof(double) >= sizeof(float)
sizeof(short) >= sizeof(int)
A published solution is not available for this question yet.
Question 66 MCQ · 3.0 marks
Select the snippet that will generate the output "12345".
[[IMAGE:1a594c2b328ed055_7_6]]

[[IMAGE:1a594c2b328ed055_7_7]]

[[IMAGE:1a594c2b328ed055_7_8]]

[[IMAGE:1a594c2b328ed055_8_9]]

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

If (R[1] >= 0), go to Step 3
If (R[1] > 0), go to Step 3
If (R[1] >= 0), go to Step 7
If (R[1] > 0), go to Step 7
A published solution is not available for this question yet.
Question 68 MCQ · 4.0 marks
[[IMAGE:1a594c2b328ed055_10_11]]

8
18
14
10
A published solution is not available for this question yet.
Question 69 NAT · 3.0 marks
What is the minimum **number of bits** required to represent the character set with uppercase and
lowercase alphabets, the digits from 0 to 9, space, comma and full stop?
A published solution is not available for this question yet.
Question 70 MCQ · 3.0 marks
[[IMAGE:1a594c2b328ed055_12_12]]
Based on the above data, answer the given subquestions.
If a = 0 and the output of the given program is 'A', then what can be the possible values of b and c?

[[IMAGE:1a594c2b328ed055_13_13]] b = 0, c = 0

b = 0, c = 1
b = 1, c = 0
b = 1, c = 1
A published solution is not available for this question yet.
Question 71 MSQ · 4.0 marks
[[IMAGE:1a594c2b328ed055_12_12]]
Based on the above data, answer the given subquestions.
If a, b, and c could only take the values 0 or 1, select all the statements that are correct.

If the output of the program is '2' and b=0, then the value of c is 1.
If the output of the program is '2' and b=0, then the value of c is 0.
If the value of c is 0, then the output cannot be '1' for any values of a and b.
If the value of b is 0, then the output cannot be '1' for any values of a and c.
A published solution is not available for this question yet.
Question 72 NAT · 3.0 marks
[[IMAGE:1a594c2b328ed055_14_14]]
Based on the above data, answer the given subquestions.
If the value of **b** is 9, then what will be the output of the given program?

A published solution is not available for this question yet.
Question 73 NAT · 4.0 marks
[[IMAGE:1a594c2b328ed055_14_14]]
Based on the above data, answer the given subquestions.
If the value of **b** is 10, then what will be the output of the given program?

A published solution is not available for this question yet.