WorksheetsICT S112 Midterm Review Quiz
Total questions: 25
Worksheet time: 13mins
It is a branch of Discrete Mathematics dedicated to the study of the properties and manipulation of logical expressions.
Binary Tree
Boolean Algebra
Linear Algebra
Root Tree
It is a statement used to make decisions based on a given condition.
Conditional Statement
Formula
Functions
Stream
It is a powerful statement for decision making and is used to control the flow of execution of statements
If-Else Statement
Nested If-Else Statement
Simple If Statement
Switch Statement
This conditional statement evaluates if a Boolean expression is True to execute an IF block, otherwise, the ELSE block will be executed.
If-Else Statement
Nested If-Else Statement
Simple If Statement
Switch Statement
This conditional statement uses another set of conditional statement within an if or else block.
If-Else Statement
Nested If-Else Statement
Simple If Statement
Switch Statement
This conditional statement allows a variable to be tested for equality against a list of values.
If-Else Statement
Nested If-Else Statement
Simple If Statement
Switch Statement
Which of the following relational symbols makes the statement FALSE:
(3 ___ 6)
!=
>
<
<=
Which of the following relational symbols makes the statement FALSE:
(10 ___ 5)
!=
>
<
>=
Which of the following statements expresses a TRUE statement?
5!=5
5>5
5<5
5>=5
Given a=10 and b=20, which of the following statements expresses a TRUE statement?
a==b
a>b
a<=b
a>=b
Which of the following symbols means NOT EQUAL TO?
!=
>
<
>=
Given a=20 and b=20, which of the following statements expresses a FALSE statement?
a==b
a!=b
a<=b
a>=b
Given a=50 and b=30, which of the following statements expresses a TRUE statement?
a==b
a<b
a<=b
a>=b
Which of the following is the correct way to express an if statement?
if (condition);
if (condition)
if {condition}
if (condition;)
Which of the following is the correct way to express an else statement?
else
else (condition)
else {condition}
else {condition;}
Which of the following is the correct way to express a switch statement?
switch
switch (case)
switch (variable)
switch (variable);
Which of the following is the correct way to express a case statement?
case n: (variable); break;
case (variable): {statement;} break;
case n: {statement;} break;
case n: {variable;} break;
Which of the following is the correct way to express default in a switch statement?
default {statement;}
default; (statement)
default; {statement;}
default: {statement;}
Which of the following expressions is the correct way to evaluate two variables?
if (a=b)
if (a=b);
if (a==b);
if (a==b)
Which of the following is the correct way to evaluate variable to a string?
if (a=='JRU')
if (a=="JRU")
if (a==JRU)
if (a!='JRU')
Which of the following is the correct way to evaluate variable to a character?
if (a=='A')
if (a>='A')
if (a==A)
if (a>=A)
Which of the following is the expression that evaluates a variable to an integer?
if (a>=10)
if (a=='10')
if (a=="10")
if (a>='10')
Which of the following is the correct way to declare a string?
str name1, name2;
str name1, name 2
string name1, name2;
string name1, name2:
Which of the following is the correct way to declare a character?
char a, b;
char a, b:
character a, b;
character a, b
Which of the following is the correct way to declare an integer?
int a, b;
int a, b:
integer a, b;
integer a, b
