MauryaHub PYQ Practice

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?
  1. ALU (Arithmetic Logic Unit)
  2. Cache Memory
  3. Control Unit
  4. 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?
  1. Cache Memory
  2. RAM (Random Access Memory)
  3. ROM (Read-Only Memory)
  4. 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.
  1. CPU reads the values from the peripherals by reading the value at the memory address mapped to them.
  2. CPU has separate instructions for performing read and write from a peripheral.
  3. CPU cannot read the values from the peripherals
  4. 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?
  1. 4
  2. 14
  3. 12
  4. 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 ___?
  1. 4
  2. 8
  3. 12
  4. 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?
  1. 4
  2. 6
  3. 7
  4. 8

A published solution is not available for this question yet.

Question 64 MCQ · 3.0 marks

[[IMAGE:1a594c2b328ed055_6_1]]
Source diagram or notation
  1. [[IMAGE:1a594c2b328ed055_6_2]]
    Source diagram or notation
  2. [[IMAGE:1a594c2b328ed055_6_3]]
    Source diagram or notation
  3. [[IMAGE:1a594c2b328ed055_6_4]]
    Source diagram or notation
  4. [[IMAGE:1a594c2b328ed055_6_5]]
    Source diagram or notation

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.
  1. sizeof(char) >= sizeof(double)
  2. sizeof(int) >= sizeof(float)
  3. sizeof(double) >= sizeof(float)
  4. 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".
  1. [[IMAGE:1a594c2b328ed055_7_6]]
    Source diagram or notation
  2. [[IMAGE:1a594c2b328ed055_7_7]]
    Source diagram or notation
  3. [[IMAGE:1a594c2b328ed055_7_8]]
    Source diagram or notation
  4. [[IMAGE:1a594c2b328ed055_8_9]]
    Source diagram or notation

A published solution is not available for this question yet.

Question 67 MCQ · 4.0 marks

[[IMAGE:1a594c2b328ed055_9_10]]
Source diagram or notation
  1. If (R[1] >= 0), go to Step 3
  2. If (R[1] > 0), go to Step 3
  3. If (R[1] >= 0), go to Step 7
  4. 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]]
Source diagram or notation
  1. 8
  2. 18
  3. 14
  4. 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?
    Source diagram or notation
    1. [[IMAGE:1a594c2b328ed055_13_13]] b = 0, c = 0
      Source diagram or notation
    2. b = 0, c = 1
    3. b = 1, c = 0
    4. 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.
    Source diagram or notation
    1. If the output of the program is '2' and b=0, then the value of c is 1.
    2. If the output of the program is '2' and b=0, then the value of c is 0.
    3. If the value of c is 0, then the output cannot be '1' for any values of a and b.
    4. 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?
    Source diagram or notation

      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?
      Source diagram or notation

        A published solution is not available for this question yet.