1.
Match the following Statement / Name to its description. [8M]
No
|
Statements
|
|
Description
|
I.
|
x = 1;
|
|
Increment
|
II.
|
int x = 1;
|
|
Addition
|
III.
|
double radius;
|
|
Declaring Variables
|
IV.
|
final int SIZE = 3;
|
|
Declaring and Initializing
|
V.
|
+
|
|
Assignment Statements
|
VI.
|
*
|
|
Remainder
|
VII.
|
%
|
|
Multiplication
|
VIII.
|
++
|
|
Constants
|
2. Show an
evaluation tree for the following expressions: [6
marks]
I.
10 + 2 - 4
II.
3 + 3 * 3 % 2
III.
3 + 2 / 5 +2 * 4
No comments:
Post a Comment