Font size
WorksheetsM2 - Topic 5 - Variables & Constants
Total questions: 10
Worksheet time: 3mins
Correct way of integer declaration
int age = 6.6;
integer age = 6;
int age = 6
int age = 6;
integer age = 6.6;
Correct declaration of float variable
float age = 5;
float age = '5';
float age = "5";
float age = 5.5
float age ='5.5'
bool stands for booleye
bool stands for bool_lightsOFF
bool stands for boolean
bool stands for bool_char
bool stands for bool_init
3.14159
is a char
is a int
is a integer
is a String
is a double
Variable can be
Local or Constant
Local or Global
Constant or String
Global or Logical
x_5555 is a valid data type
x_5555 is a not valid data type
x_5555 is a valid variable name
x_5555 is a not valid variable name
not a valid declaration
"8" is not a String
is a valid declaration
should use int
A bool variable declaration can be
TRUE
FALSE
RIGHT
WRONG
Variable names can
use special characters
start with a digit
end with a digit
use special keyword
valid
not valid
