
SELF TEST
Click here for a FORMS compatible inter-active version of this test
1. Which of the following Pascal functions which change the value 6.6 to an integer value of 7
odd
round
trunc
abs
2. Which of the following Pascal operators has the least priority
=
+
/
NOT
3. Write a simple Pascal procedure called Welcome which prints the text string "Welcome to Pascal"
4. Write a Pascal procedure called Multiply, which accepts two integers, number1 and number2, and prints the result of multiplying the two integers together
5. What is the output of the following Pascal program
program Sample( output );
var x, y : integer;
procedure godoit( x, y : integer );
begin
x := y; y := 0;
writeln( x, y );
end;
begin
x := 1; x := 2;
godoit( x, y );
writeln( x, y )
end.
6. Write a Pascal function called Multiply2 which returns an
integer result. The function accepts two integer parameters, number1
and number2 and returns the value of multiplying the two parameters
