1. What is Type used for?
For typing text on the screen. For defining a new type of variable. For making combinations of arrays and records. For declaring variables of mixed types.
We should use 'Type b: real' instead. real is already defined. The syntax is wrong, we should use 'typedef' instead. Type only specifies a type for variables to be declared later and doesn't create a variable itself.
4. What will be the output of the next code? Type floats = array[1..10] of real;
PROCEDURE WriteIt(r: floats); begin WriteLn(r[1]); end;
Var x: array[1..10] of integer;
begin x[1] := 3; WriteIt(x); end.
Undetermined. We forgot to initialize the array r! 3.0 Nothing; type mistmatch in calling the procedure. 3