Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ICT S112 Midterm Review Quiz

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

It is a branch of Discrete Mathematics dedicated to the study of the properties and manipulation of logical expressions.

a)

Binary Tree

b)

Boolean Algebra

c)

Linear Algebra

d)

Root Tree

2.

It is a statement used to make decisions based on a given condition.

a)

Conditional Statement

b)

Formula

c)

Functions

d)

Stream

3.

It is a powerful statement for decision making and is used to control the flow of execution of statements

a)

If-Else Statement

b)

Nested If-Else Statement

c)

Simple If Statement

d)

Switch Statement

4.

This conditional statement evaluates if a Boolean expression is True to execute an IF block, otherwise, the ELSE block will be executed.

a)

If-Else Statement

b)

Nested If-Else Statement

c)

Simple If Statement

d)

Switch Statement

5.

This conditional statement uses another set of conditional statement within an if or else block.

a)

If-Else Statement

b)

Nested If-Else Statement

c)

Simple If Statement

d)

Switch Statement

6.

This conditional statement allows a variable to be tested for equality against a list of values.

a)

If-Else Statement

b)

Nested If-Else Statement

c)

Simple If Statement

d)

Switch Statement

7.

Which of the following relational symbols makes the statement FALSE:

(3 ___ 6)

a)

!=

b)

>

c)

<

d)

<=

8.

Which of the following relational symbols makes the statement FALSE:

(10 ___ 5)

a)

!=

b)

>

c)

<

d)

>=

9.

Which of the following statements expresses a TRUE statement?

a)

5!=5

b)

5>5

c)

5<5

d)

5>=5

10.

Given a=10 and b=20, which of the following statements expresses a TRUE statement?

a)

a==b

b)

a>b

c)

a<=b

d)

a>=b

11.

Which of the following symbols means NOT EQUAL TO?

a)

!=

b)

>

c)

<

d)

>=

12.

Given a=20 and b=20, which of the following statements expresses a FALSE statement?

a)

a==b

b)

a!=b

c)

a<=b

d)

a>=b

13.

Given a=50 and b=30, which of the following statements expresses a TRUE statement?

a)

a==b

b)

a<b

c)

a<=b

d)

a>=b

14.

Which of the following is the correct way to express an if statement?

a)

if (condition);

b)

if (condition)

c)

if {condition}

d)

if (condition;)

15.

Which of the following is the correct way to express an else statement?

a)

else

b)

else (condition)

c)

else {condition}

d)

else {condition;}

16.

Which of the following is the correct way to express a switch statement?

a)

switch

b)

switch (case)

c)

switch (variable)

d)

switch (variable);

17.

Which of the following is the correct way to express a case statement?

a)

case n: (variable); break;

b)

case (variable): {statement;} break;

c)

case n: {statement;} break;

d)

case n: {variable;} break;

18.

Which of the following is the correct way to express default in a switch statement?

a)

default {statement;}

b)

default; (statement)

c)

default; {statement;}

d)

default: {statement;}

19.

Which of the following expressions is the correct way to evaluate two variables?

a)

if (a=b)

b)

if (a=b);

c)

if (a==b);

d)

if (a==b)

20.

Which of the following is the correct way to evaluate variable to a string?

a)

if (a=='JRU')

b)

if (a=="JRU")

c)

if (a==JRU)

d)

if (a!='JRU')

21.

Which of the following is the correct way to evaluate variable to a character?

a)

if (a=='A')

b)

if (a>='A')

c)

if (a==A)

d)

if (a>=A)

22.

Which of the following is the expression that evaluates a variable to an integer?

a)

if (a>=10)

b)

if (a=='10')

c)

if (a=="10")

d)

if (a>='10')

23.

Which of the following is the correct way to declare a string?

a)

str name1, name2;

b)

str name1, name 2

c)

string name1, name2;

d)

string name1, name2:

24.

Which of the following is the correct way to declare a character?

a)

char a, b;

b)

char a, b:

c)

character a, b;

d)

character a, b

25.

Which of the following is the correct way to declare an integer?

a)

int a, b;

b)

int a, b:

c)

integer a, b;

d)

integer a, b