wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

A2 CS PPE Prep Dec23 mmd

Total questions: 150

Worksheet time: 2hrs 31mins

Name
Class
Date
1.

CISC processors...

a)

Are physically larger

b)

Are better at complex tasks

c)

Use more electricity than RISC

d)

Expect more work from the compiler to generate more code

e)

Not as good at pipelining

2.

An example of where you would find CISC processors:

a)

Tablets

b)

Smartphones

c)

Laptops

d)

Desktop Computers

e)

Smartwatches

3.

An example of where you would find RISC processors:

a)

Tablets

b)

Smartphones

c)

Laptops

d)

Desktop Computers

e)

Smartwatches

4.

RISC Processors...

a)

Minimise the number of clock cycles per instruction

b)

Have a larger instruction set

c)

Tend to run at a lower clock speed

d)

Make use of pipelining

e)

Use less power and generate less heat

5.

Pipelining means...

a)

Running the fetch-decode-execute cycle more efficiently

b)

Waiting for a full fetch-decode-execute cycle to complete before starting the next

c)

Fetches the next instruction while the previous instruction is still decoding

d)

CISC processors can run more efficiently

e)

RISC processors can run more efficiently

6.

Serial processing is...

a)

instructions which are done one after the other to complete a task

b)

instructions which are run concurrently to complete a task

c)

Always possible

d)

Not always possible

7.

Parallel processing is...

a)

instructions which are done one after the other to complete a task

b)

instructions which are run concurrently to complete a task

c)

Always possible

d)

Not always possible

8.

Distributed processing...

a)

Shares tasks to multiple processors through networked computers

b)

Uses the processor more efficiently by splitting up the task

c)

Is another name for parallel processing

9.

Select the true statements about operating systems:

a)

A computer can only have one OS

b)

The OS manages memory, storage, security, printing and other useful functions of the system

c)

The OS provides a user interface

d)

All OSes allow you to use multiple programs at once

10.

This image shows...

a)

Memory paging

b)

Memory segmentation

c)

Distributed processing

d)

Virtual memory

11.

This image shows...

a)

Memory paging

b)

Memory segmentation

c)

Distributed processing

d)

Virtual memory

12.

Select the true statements about memory paging:

a)

Processes are split into equal sized frames

b)

A page table is used to record all the pages

c)

Unused pages are swapped out of main memory and into virtual memory

d)

Processes are split into variable sized frames

13.

Segmentation:

a)

Splits processes into variable sized pieces

b)

Splits processes into set sized pieces

c)

Keeps processes together in RAM

d)

Places processes wherever there is space in RAM

e)

Can cause stack overflows

14.

The role of scheduling is...

a)

To make sure tasks get as much time as they need on the CPU

b)

To make sure that all tasks get time on the processor and respond in a reasonable time

c)

To make sure that the user does not have to wait for processes to run

d)

To prevent the user from crashing the computer

15.

An OS which you would use in day-to-day life on a normal school computer is a...

a)

Embedded

b)

Real Time

c)

Distributed

d)

Multi-Tasking

e)

Multi-User

16.

For a very large and complex system which needs multiple processors, you would use a _______________ OS:

a)

Embedded

b)

Real Time

c)

Distributed

d)

Multi-Tasking

e)

Multi-User

17.

For a system which needs a guaranteed response rate, you would use a _______________ OS:

a)

Embedded

b)

Real Time

c)

Distributed

d)

Multi-Tasking

e)

Multi-User

18.

For a simple system with very limited processing power, you would use a _______________ OS:

a)

Embedded

b)

Real Time

c)

Distributed

d)

Multi-Tasking

e)

Multi-User

19.

To share one processor's power between multiple people, you would use a _______________ OS:

a)

Embedded

b)

Real Time

c)

Distributed

d)

Multi-Tasking

e)

Multi-User

20.

The BIOS allows you to:

a)

Change the computer's time/date settings

b)

Change the order in which drives are booted from

c)

Change the computer's operating system

d)

Change the user's login details

21.

Device drivers...

a)

allow peripherals to communicate with the OS

b)

allow users to communicate with the OS

c)

allow peripherals to work directly with the CPU

d)

allow users to change settings of their peripherals

22.

A virtual machine...

a)

uses secondary storage instead of RAM when the computer runs out of space on the main memory

b)

allows software to act as hardware, running code or an operating system within another OS.

c)

can only be used through the internet

d)

relies on cloud storage

23.

Closed Source software is...

a)

Always bug free

b)

Sometimes very expensive

c)

Generally well-tested

d)

A good choice for large organisations

e)

Usually well-supported by the developer

24.

The correct order of the stages of compilation is:

a)

Lexical Analysis, Syntax Analysis, Code Generation, Code Optimisation

b)

Lexical Analysis, Syntax Analysis, Code Optimisation, Code Generation

c)

Syntax Analysis, Lexical Analysis, Code Optimisation, Code Generation

d)

Syntax Analysis, Lexical Analysis, Code Generation, Code Optimisation

25.

Removing whitespace is in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

26.

Token creation is in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

27.

Symbol table is created in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

28.

The code is checked against the rules in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

29.

The syntax tree is created in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

30.

The user will first be alerted to errors found in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

31.

The syntax tree is converted into object code in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

32.

Redundant code is removed in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

33.

The code is improved to run as fast as possible in:

a)

Lexical Analysis

b)

Syntax Analysis

c)

Code Generation

d)

Code Optimisation

34.

Iterative development methodology which values end-user input:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

35.

Select the real methodologies:

a)

Agile

b)

XP

c)

XD

d)

Spiral

e)

Waterfall

36.

Iterative development methodology which values code quality:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

37.

Iterative development methodology which values speed of development:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

38.

Iterative development methodology which focuses on risk-management:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

39.

Sequential development methodology which focuses on comprehensive documentation:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

40.

A small start-up who want to get a prototype onto the market for testing should use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

41.

A large company who want to develop their software so people actually want to use it should use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

42.

A processor company who need to develop high-quality code with minimal errors should use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

43.

Most software companies use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

44.

Very large projects which require a lot of paperwork and documentation should use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

45.

A company who need to manage a lot of risk should use:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

46.

This methodology is:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

47.

This methodology is:

a)

XP

b)

Agile

c)

Waterfall

d)

Spiral

e)

RAD

48.

A programming mechanism that binds together code and the data it manipulates, and that keeps both safe from outside interference and misuse.

a)

Polymorphism

b)

Inheritance

c)

Encapsulation

d)

Object-Oriented Programming

49.

Is the process by which one object can acquire the properties of another object.

a)

Polymorphism

b)

Inheritance

c)

Encapsulation

d)

Object-Oriented Programming

50.
What is the difference between a class and an object?
a)
A class is a blueprint to make an object
b)
An object is a blueprint to make a class
c)
A blueprint is an object to make a class
d)
Blueprint class is an object make a
51.

Characteristics of OOP.. (Tick all)

a)

Data types

b)

Encapsulation

c)

Inheritance

d)

Polymorphism

e)

algorithm

52.

Which paradigm makes use of methods and attributes to encapsulate data in classes.

a)

Declarative

b)

Imperative

c)

Object oriented

d)

Low level

53.
Which of the following is a mechanism by which object acquires the properties of another object?
a)
Encapsulation
b)
 Abstraction
c)
Inheritance
d)
 Polymorphism
54.

Refer to the shark class. Which of the following is an instance variable?

a)

age

b)

region

c)

sharkAge

d)

Shark

55.

Why is OOP a powerful programming technique?

a)

Because it's fun

b)

Because it's easy to learn

c)

Because it allows for reusability

d)

It isn't

56.

How many classes can be defined in a single program?

a)

As many as you want

b)

Only 1

c)

Only 100

d)

Only 999

57.

A user-defined name of a program element, such as a variable or constant.

a)

Pseudocode

b)

Data Type

c)

Identifier

d)

Container

58.

What is the advantage of a distributed OS?

a)

the programmer can control the distribution of the task as the operation is entirely handled by the OS

b)

there is a hardware redundancy

c)

no need for training or writing programs differently, may result in better performance

d)

when there is a fault in the hardware, as soon as the OS detects it then responds appropriately

59.

What are the key reasons for compressing data?

a)

Less space needed for storage

b)

Less time to transmit

c)

Higher quality files

d)

Reduced amount of processing power

e)

Limited RAM

60.

Lossless compression...

a)

Is used when not all the information is needed

b)

Is not as effective as lossy compression

c)

Can fully regenerate the original file

d)

Includes files such as .ZIP

e)

Would be a sensible choice for a music download site

61.

Lossy compression...

a)

Permanently removes data from a file

b)

Always leads to a noticeable loss of quality

c)

Aims to remove redundant data

d)

Can return the original file to its original quality

e)

Would be a sensible choice for a music download site.`

62.

Dictionary based compression...

a)

Is a lossless compression format

b)

Creates a dictionary of common letter combinations to encode words with fewer characters

c)

Creates a dictionary of smaller letters so less space is used

d)

Sends the dictionary with the data

e)

Doesn't need to send the dictionary with the data

63.

Run-length encoding...

a)

is Lossless

b)

is Lossy

c)

Can only be used for text

d)

Records the number of repeats of an individual element

e)

Can be used for a wide variety of file types

64.

Encryption...

a)

Uses at least one key to cipher data

b)

Is only used on text

c)

Can be symmetric or asymmetric

d)

Is impossible to break

e)

Has developed a lot as processing power has increased

65.

Symmetrical encryption techniques...

a)

Are the most secure types of encryption

b)

Use a single key to encode/decode

c)

Use multiple keys to encode/decode

d)

Include XOR, Caesar and Route

e)

Include RSA, Diffie-Hellman and DSS

66.

Asymmetrical encryption techniques...

a)

Are the most secure types of encryption

b)

Use a single key to encode/decode

c)

Use multiple keys to encode/decode

d)

Include XOR, Caesar and Route

e)

Include RSA, Diffie-Hellman and DSS

67.

Asymmetrical encryption...

a)

Often requires considerable processing power

b)

Is impossible to break

c)

Is being threatened by the possibility of quantum computing

d)

Can be brute-force attacked

e)

Is very widely used, even in small businesses

68.

In a hospital system, the relationship between a consultant to a patient would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

69.

In a hospital system, the relationship between a nurse to a ward would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

70.

In a hospital system, the relationship between a patient to a surgeon would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

71.

In a hospital system, the relationship between a consultant to a student would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

72.

In a school system, the relationship between a teacher to a pupil would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

73.

In a school system, the relationship between a teacher to a department would be:

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

Many-to-One

74.

Which field is likely to be a foreign key?

a)

Sales ID

b)

Item ID

c)

Item Name

d)

Address

e)

Payment Complete?

75.

What will be returned by the SQL query:

SELECT * FROM Sales WHERE Sales ID = "00113"

a)

00112 1151213215 Keyring 123 Example Ln 1

b)

00112 65465654688 Pencil 123 Example Ln 1

c)

00112 87954121321 Bag 123 Example Ln 1

d)

00113 65465654688 Pencil 77 Bay St 0

e)

00114 65465654688 Pencil 999 Letsbey Ave 1

76.

Which of the following SQL statements will return the Sales ID of all sales which involve a pencil?

a)

SELECT * FROM Sales WHERE Item Name = "Pencil"

b)

SELECT * FROM Sales WHERE Item Name = Pencil

c)

SELECT Sales ID FROM Sales WHERE Item Name = "Pencil"

d)

SELECT Sales ID FROM Sales WHERE Item Name = Pencil

e)

SELECT "Sales ID" FROM Sales WHERE Item Name = "Pencil"

77.

Which of the following SQL statements will return the address of anyone who has ordered a pencil and has paid.

a)

SELECT Address FROM Sales WHERE Item Name = "Pencil" and Payment Complete? = TRUE

b)

SELECT Address FROM Sales WHERE Item Name = "Pencil" and Payment Complete? = "TRUE"

c)

SELECT Address FROM Sales WHERE Item Name = Pencil and Payment Complete? = TRUE

d)

SELECT Address FROM Sales WHERE Item Name = "Pencil" or Payment Complete? = TRUE

e)

SELECT Address FROM Sales WHERE "Item Name" = "Pencil" and "Payment Complete?" = TRUE

78.

Select the things which are true for a database in 1NF:

a)

Each entity has a unique identifier

b)

Each attribute is atomic (divided as small as possible)

c)

Each attribute has a single value

d)

There is no repetition

e)

There are no transitive relationships

79.

Select the things which are true for a database in 2NF:

a)

The database is in 1NF

b)

All attributes depend on the primary key

c)

There is no dependence

d)

There is no repetition

e)

There are no transitive relationships

80.

Select the things which are true for a database in 3NF:

a)

The database is in 2NF

b)

There are at least 4 tables in the database

c)

There is no dependence

d)

All attributes have a separate table

e)

There are no transitive relationships

81.

What normal form is this table in?

a)

1NF

b)

2NF

c)

3NF

82.

What normal form is this table in?

a)

1NF

b)

2NF

c)

3NF

83.

What normal form is this table in?

a)

1NF

b)

2NF

c)

3NF

84.
What is the Mnemonic code for the STORE instruction in LMC?
a)
STO
b)
LDA
c)
STA
d)
BRA
85.
What does the BRA loop do in LMC?
a)
This will keep looping the program until you stop it.
b)
This will loop the program until a certain condition is met.
c)
This will loop the program until the accumulator is 0.
d)
This will loop the program until the accumulator is negative
86.

The buses involved in the Fetch-Decode-Execute system are...

a)

Data Bus

b)

Information Bus

c)

Address Bus

d)

Control Bus

e)

Process Bus

87.

Which of the tag is used to create a numbered list?

a)

<L> </L>

b)

<LI> </LI>

c)

<li> </lo>

d)

<ol> </ol>

88.

Web pages start with which of the following tags?

a)

<form>

b)

<HTML>

c)

<body>

d)

<Title>

89.

Choose the correct HTML element for the largest heading:

a)

<head>

b)

<h1>

c)

<heading>

d)

<h6>

90.

What defines the beginning and ending of the visible part of a webpage?

a)

<head> main part of the document </body>

b)

<body> main part of the document </html>

c)

d) </body> main part of the document <html>

d)

<body> main part of the document </body>

91.

What is the correct syntax for defining a hyperlink in HTML?

a)

<a href=”url”> Link text </a>

b)

<a href=”url”> Link text <a>

c)

<a=”url”> Link text <a>

d)

<ref=”url”> Link text <a>

92.

Which of the following is a valid CSS rule?

a)

h1 {

color: blue;

}

b)

<h1> {

color: blue;

}

c)

h1 {

color="blue";

}

d)

h1 {

color=blue;

}

93.

Which CSS property can be used to change the font?

a)

font-size

b)

text-align

c)

font-famiy

d)

text-decoration

94.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

95.

What is not incuded in a packet?

a)

Sender IP address

b)

Checksum

c)

Router ID

d)

Packet number

96.

Which protocol is used to send packets

a)

IP

b)

FTP

c)

SMTP

d)

TCP

97.

Which is not a layer in the TCP/IP model?

a)

Application

b)

Transmission

c)

Internet

d)

Network

98.

Which are not one of the application layer protocols?

a)

DNS

b)

FTP

c)

SMTP

d)

FNP

99.

Which is the first layer of the TCP/IP model?

a)

Network

b)

Application

c)

Transport

d)

Internet

100.

How many octets is an IPv4 address made up of?

a)

1

b)

2

c)

3

d)

4

101.

What is name of the protocol that matches domain names to IP addresses?

a)

SMTP

b)

TCP

c)

IP

d)

DNS

102.

What kind of address is made up of hex pairs and stored on each device's NIC?

a)

MAC

b)

TCP

c)

IP

d)

DNS

103.

Which of the TCP/IP model layers is responsible for breaking down the message into packets?

a)

Network

b)

Application

c)

Transport

d)

Internet

104.
Which of these are mail protocols?
a)
SMTP and POP
b)
TCP and FTP
c)
FTP and SMTP
d)
POP and IP
105.
What advantage does the IPv6 standard have over the Internet Protocol version 4 (IPv4) standard?
a)
It vastly increases the available pool of IP addresses.
b)
It enables greater data transmission speeds.
c)
It supports the IPsec security feature, which is unavailable in IPv4.
d)
It allows devices to self-assign an IP address from a server.
106.

Before a web browser makes a request to a DNS server / resolver, it will check it's...

a)

DNS root server

b)

HTTP protocol

c)

DNS Cache

d)

RAM

107.

How many DNS root server IP addresses exist?

a)

13

b)

1,000,000

c)

1

d)

5,600

108.

IP addresses and MAC addressed can be falsified, which is a risk to cyber security. This is known as...

a)

Pharming

b)

Cross-site scripting

c)

Identity theft

d)

Spoofing

109.

When the Network layer adds an IP address to the port number added by the Transport layer, it creates a...

a)

link

b)

error

c)

MAC address

d)

socket

110.
Which of the following is not a method of opening files?
a)
Replace
b)
Append
c)
Write
d)
Read
111.

Assume that there is a recursive binary search function find(). If a sorted list has a data structure with indices 0 to 50 and the item being searched for happens to be at location 6, write each call of find() that would occur while searching for that item. The first is find(0,50).

a)

find(0, 25) find(0, 12) find(0, 6)

b)

find(0, 25) find(0, 12)

c)

find(0, 25)

d)

find(0, 25) find(0, 12) find(0, 6) find(0, 3)

112.

Which is the best way to debug recursive functions?

a)

Adding print statement of what that line of code does.

b)

Adding output statements by keeping all the statements left aligned

c)

Adding output statements with an indent to print statements at every iteration.

d)

Adding output statements by keeping all the statements equally indented

113.

While adding output statements to debug recursive functions, _____ the print statements to show the current depth of recursion.

a)

left align

b)

indent

c)

right align

d)

center align

114.

Which of the following is a good candidate for using recursive functions?

a)

To solve the greatest common divisor (GCD) problem

b)

To solve problems that have a true and false solution

c)

To solve problems that require excessive memory allocation

d)

To solve logarithmic problems

115.

Which code calculates the power of a number raised to another (a^b)?

a)

def power(a,b):

if b == 1:

return a

else:

return a**power(a,b-1)

b)

def power(a,b):

if b == 1:

return a

else:

return a*power(b-1,a)

c)

def power(a,b):

if b == 1:

return a

else:

return a**power(b-1,a)

d)

def power(a,b):

if b == 1:

return a

else:

return a*power(a,b-1)

116.

Identify the error in the code that scrambles a word’s letters in all the possible ways..

def scramble(r_letters, s_letters):

if len(r_letters) == 0:

print(s_letters)

else:

for i in range(len(r_letters)):

scramble_letter = r_letters[i]

remaining_letters = r_letters[:i] + r_letters[i-1:]

scramble(remaining_letters, s_letters + scramble_letter)

scramble('abc','')

a)

scramble_letter = r_letters[i]

b)

remaining_letters = r_letters[:i] + r_letters[i-1:]

c)

scramble(remaining_letters, s_letters + scramble_letter)

d)

if len(r_letters) == 0

117.

How do you modify elements in a nested array in Python?

a)

Use the 'remove' method to delete the element from the nested array.

b)

Use the 'pop' method to remove and return the element from the nested array.

c)

Use the 'append' method to add a new value to the nested array.

d)

Access the element using indexing and assign a new value to it.

118.

Select ALL the situations that a Queue data structure would be used?

a)

Printer in a room full of computers

b)

Characters typed on a keyboard

c)

Back Button

d)

Undo Button

119.

Which is the correct operation for:

"Add a item to the rear of the queue."

a)

enQueue(item)

b)

Append.Queue(item)

c)

enQueue()

d)

AddItem(EnQueue())

120.

Which is the correct operation for:

"Remove the front item from the queue and return it"

a)

dQueue()

b)

de.Queue(Item)

c)

deQueue()

d)

item.remove()

e)

Cant be performed on a Queue Data Structure.

121.

Which is the correct operation for:

"Remove the rear item from the queue and return it"

a)

dQueue()

b)

de.Queue(Item)

c)

deQueue()

d)

item.remove()

e)

Cant be performed on a Queue Data Structure.

122.

Which is the correct operation for:

"Add a item to the front of the queue."

a)

enQueue(item)

b)

Append.Queue(item)

c)

enQueue()

d)

AddItem(EnQueue())

e)

Cant be performed on a Queue.

123.

Select operations that can be performed on a Queue Data Structure...

a)

isEmpty()

b)

pop()

c)

push()

d)

isFull()

e)

Append(Item)

124.

What would happen if...

deQueue()

enQueue(Hanna)

enQueue(Steve)

enQueue(Jack)

a)

front = 1 rear = 0

*and Steve would be unable to be added to position 0.

b)

front = 1 rear = 5

*and Jack would be unable to be added to position 0

c)

front = 0 rear = 5

d)

front = 0 rear = 4

e)

front = 1 rear = 4

125.

The following circular queue can accommodate a maximum six elements with the following data

front = 2 rear = 4

queue = ____; L ; M; N; ___; ___

What will happen after ADD O operation takes place?

a)

front = 2 rear = 5

queue = ______; L, M, N, O, ___

b)

ront = 3 rear = 5

queue = L, M, N, O, ___

c)

front = 3 rear = 4

queue = ______; L, M, N, O, ___

d)

ront = 2 rear = 4

queue = L, M, N, O, ___

126.

If I want to find out if an item is in a queue or a stack - what do I call?

a)

Contains(item)

b)

IsContains(item)

c)

Peek(item)

d)

Find(item)

127.

What is the reason for using a circular queue instead of a regular queue?

a)

running time of enqueue is improved

b)

reuse empty space

c)

you can traverse the elements more efficiently

d)

none of the above

128.

Consider Stack is implemented using the array.

#define MAX 10

struct STACK

{

int arr[MAX]

int top = ___________;

}

What will be the initial value with which top is initialized.

a)

0

b)

-1

c)

garbage

d)

1

129.

In linked list implementation of a queue,the important condition for a queue to be empty is?

a)

REAR is NULL

b)

FRONT is 1

c)

REAR is 1

d)

FRONT is NULL

130.

A stack is implemented in Python using the built-in list data structure. Complete this code of function peek() within the Stack class.

class Stack:

def __init__(self):

self.items = [ ]

def peek(self):

…………………

a)

return self.items[len(self.items)]

b)

return self.items[stack.length]

c)

return self.items[stack.length-1]

d)

return self.items[len(self.items)-1]

131.

The following operations are performed on a Stack.

s=Stack()

s.push(‘a’)

s.push(‘b’)

s.pop()

s.push(‘c’)

s.peek()

What is the top of the Stack s when these operations are complete?

a)

'a'

b)

'b'

c)

'c'

d)

Stack is empty

132.

stack colours=(‘Red’, ‘Green’, ‘Blue’)


colours.push(‘Black’) is executed. Stack colours=………………..?

a)

('Black', 'Red', 'Green', 'Blue')

b)

('Black', 'Blue')

c)

(''Red', 'Green', 'Blue', 'Black')

d)

Error

133.

CIRCULAR QUEUE

q=Queue(4)

q.enQueue(10)

q.enQueue(20)

q.enQueue(30)

q.enQueue(40)

q.deQueue()

q.enQueue(50)

What is the value of q?

a)

[10, 20, 30, 40]

b)

[10, 20, 30, 50]

c)

[50, 10, 20, 30]

d)

[50, 20, 30, 40]

134.

CIRCULAR QUEUE

q=Queue(4)

q.enQueue(10)

q.enQueue(20)

q.enQueue(30)

q.enQueue(40)

q.deQueue()

q.enQueue(50)

What is q.rear?

a)

0

b)

1

c)

2

d)

3

135.

What is the boolean expression for this logic circuit?

a)

Q = NOT (A OR B)

b)

Q = NOT A AND B

c)

NOT A OR B = Q

d)

Q = (NOT A) OR B

136.

What is the boolean expression for this logic circuit?

a)

A OR B AND C = Q

b)

Q = (A AND B) OR C

c)

Q = A OR (B AND C)

d)

Q = (A OR B) AND C

137.

Which logic gate is this truth table for?

a)

AND

b)

OR

c)

NOR

d)

XOR

138.

Which of these programming constructs make use of Boolean logic?

a)

if ... then ...

b)

while ... do ....

c)

repeat ... until ....

d)

repeat n times ....

139.

Select Most Suitable Explanation Regarding De Morgan's Theorem (select two)

a)

DeMorgan’s Theorems are two additional

simplification techniques that can be used to

simplify Boolean expressions.

b)

DeMorgan’s Theorem is a Mathematical Expression.

c)

DeMorgan’s Theorems can be used to

simplify Boolean expressions.

d)

DeMorgan’s Theorem is a Karnaugh Map.

140.

Select the De Morgan's Theorems

a)
b)
c)
d)
141.

Which one is not a Karnaugh map rule?

a)

Only power of 2 number of cells in each group.

b)

No diagonals are allowed.

c)

No zeros allowed in a group.

d)

zeros allowed in a group.

142.

Which option is correct regarding Karnaugh map rule?

a)

Every logic “1” must be in at least one group.

b)

Overlapping is allowed.

c)

Wrap around is allowed.

d)

Fewest number of groups as much as possible.

e)

All are correct

143.

Select all the choices that explains a KARNAUGH MAP?

a)

Karnaugh map is used to simplify Boolean logic expressions.

b)

It tells you what output your circuit will have given your inputs.

c)

Karnaugh map combines illustrations with common factors and therefore eliminates unwanted variables.

d)

It is a software tool for circuit building.

144.

Which one is correct?

a)
b)
c)
d)
145.

Which one is incorrect regarding Karnaugh map?

a)

b)

c)

d)

146.

Please identify the numbers that are in normalised floating point format.

a)

11001001

b)

10101010

c)

00110110

d)

01011000

e)

011011100

147.

Please identify the numbers that are not in normalised floating point format.

a)

11000011

b)

111110000

c)

011111111

d)

10000000

e)

1111111111

148.

010110100011 (8 bit signed mantissa / 4 bit signed exponent) what is the decimal number?

a)

5.625

b)

11.5

c)

-5.625

d)

-11.5

149.

What is the two's complement of 01100010 ?

a)

10011101

b)

11011101

c)

10011110

d)

10011111

150.

What is the normalised form of 0.0000111 0111

a)

1.0110000 0011

b)

1.0110000 0111

c)

0.1110000 0111

d)

0.1110000 0011