Quick Test 5: Variables


1. The difference between write and writeln is

write writes to screen, writeln to the printer.
write is used in C, writeln in PASCAL.
writeln puts the cursor on the next line.
writeln is used for formatted output.

2. To store complete values we use variables of the type

byte, integer, or word
real or double


3. The range of an integer is

0 .. 255
0 .. 65535
-32768 .. 32767
-2147483648 .. 2147483647

4. Declaring a variable means

Reserving space in memory and associating a name to it.
Assigning a name and a value
Initializing a variable
Showing its value on the screen


5. Variables

are all set to 0 at the beginning of the program
are declared by their first use
have to be assigned a value at the time of declaration
have unpredictable values at the start of the program

6. For highest-precision floating-point calculations, we use variables of the type