You are on page 1of 2

1) Which of the following operators is not a relational operator?

a) <>
b) ==
c) >=
d) ≥
e) >

2) Which of the following statement(s) is/are correctly described a variable:


a) Is stored in a named memory location.
b) Can be changed while a solution is being executed
c) Is given a specific data type
d) (a) and (b) only
e) all of the above
3) If the values for the variable a, b, and d is 5, 8, and 15, respectively, the value computed for the
expression (a * a – b * (d / a)) will be
a) 1
b) -1
c) -3.8
d) 3.8
e) none of the above

4) In the following equation, which of the options are the operands:

Result = x + y / 2 ^ 2

a) Result
b) x, y, 2
c) =
d) +, /, ^
e) 2
5) Which operator is used to compare the value of two data items?
a) logical
b) relational
c) physical
d) arithmetic
e) mathematical

6) When we want to compare the value (variable called GPA) whether it is between 3.0 and 5.0,
which of the following logical expression can be used?
a) if (GPA > 3.0 and GPA < 5.0) then
b) if NOT (GPA > 3.0 and GPA < 5.0) then
c) if (GPA >= 3.0 and GPA < 5.0) then
d) if (GPA > 3.0 and GPA <= 5.0) then
e) if (GPA > 3.0 or GPA < 5.0) then

7) A solution that cannot reach through set of steps is known as ___________.


(a) Step solution.
(b) No solution.
(c) Infinite solution.
(d) Algorithmic solution.
(e) Heuristic solution.

8) If x contains the value 5 before the following instruction is executed, what is the value of
x after the instruction: x = x * 6; is executed?
a) 5
b) 30
c) the value is unknown
d) the statement is illegal
e) 36

9) Which of the following is NOT a valid variable name?


a) integer
b) Number8
c) unitprice
d) Age3
e) Company_name

10) Which of the following is the correct rules for naming a variable ?
a) Name a variable according to what it represents.
b) Do not use spaces.
c) Start a variable name with a letter.
d) Do not use a dash or any other symbol that is used as a mathematical operator
e) All the above.

You might also like