NEW
Font size
WorksheetsPrimitive Types
Total questions: 20
Worksheet time: 10mins
What is the resulting value of x?
double x;
x = 2.3
2
2.3
Error
What is the resulting value of x?
int x;
x = 2.3;
Error
2
2.3
What is the resulting value of x?
double x;
x = 7;
Error
7
7.0
What is the resulting value of x?
int x;
x = 3/4;
Error
0
0.75
1
What is the resulting value of x?
double x;
x = 3/4;
Error
0.0
0.75
1.0
What is the resulting value of x?
double x;
x = 3.0 / 4;
Error
0.0
0.75
1.0
What is the resulting value of x?
int x;
x = 3.0 / 4;
Error
0
1
0.75
What is the resulting value of x?
double x;
x = (int) (2 + 3.3);
Error
5
5.3
5.0
What is the resulting value of x?
int x;
x = (double)(2 + 3.3);
Error
5.0
5.3
5
What is the resulting value of x?
double x;
x = (double) (10 / 4)
Error
2.5
2
2.0
What is the resulting value of x?
double x;
x = (double) 10 / 4
Error
2.5
2
2.0
What is the resulting value of x?
int x;
x = (double) (10 / 4)
Error
2.5
2
2.0
What data type for a constant called: PI = 3.14
STRING
INTEGER
FLOAT
BOOLEAN
What data type to store the price of a CD?
STRING
INTEGER
FLOAT
DATE
What data type for a car plate number: plateNumber = "AV01-AFP"?
STRING
INTEGER
FLOAT
DATE
What data type would you use to store a discount rate (e.g. 10%)?
STRING
INTEGER
FLOAT
DATE
What data type would you use to store the number of days till Christmas?
STRING
INTEGER
FLOAT
DATE
What data type for a variable called numberOfLives in a game?
STRING
INTEGER
FLOAT
BOOLEAN
What data type for: age = 15?
STRING
INTEGER
FLOAT
BOOLEAN
What does IDE mean?
Integration Development Environment
Integration Device Environment
