wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

G11_Programming Implementation Quiz

Total questions: 55

Worksheet time: 28mins

Name
Class
Date
1.

Which of the following is a characteristic of low-level programming languages?

a)

They are easy to read and write.

b)

They are machine-dependent and provide fast execution.

c)

They are portable across multiple platforms.

d)

They require a translator to convert into machine code.

2.

What is the main advantage of high-level programming languages?

a)

They execute faster than low-level languages.

b)

They are machine-independent and easier to maintain.

c)

They allow direct control of hardware.

d)

They are written in binary form.

3.

Which programming language is considered high-level?

a)

Assembly

b)

Python

c)

Machine Language

d)

Binary

4.

Which of the following is NOT a typical step in the program implementation phase?

a)

Create source code

b)

Debugging

c)

Writing machine code

d)

Translation

5.

What is the purpose of the 'Debugging' phase in program implementation?

a)

Convert the source code into machine code.

b)

Find and fix errors in the program.

c)

Maintain the program by adding new features.

d)

Write the source code in a high-level language.

6.

Which of the following errors occurs when a program does not conform to the syntax rules of the programming language?

a)

Logic error

b)

Runtime error

c)

Syntax error

d)

Debugging error

7.

In Pascal, what is the correct syntax for declaring an integer variable named 'score'?

a)

var score: integer;

b)

integer score;

c)

score := integer;

d)

var score = integer;

8.

Which of the following is an example of a logic error?

a)

Missed semicolon in the program.

b)

Dividing by zero during execution.

c)

Adding numbers instead of multiplying them.

d)

Incorrect syntax in a for loop.

9.

What is the purpose of the 'writeln' function in Pascal?

a)

Reads input from the user.

b)

Writes output and moves to the next line.

c)

Assigns values to variables.

d)

Displays a string in a dialog box.

10.

Which of the following is the correct syntax for declaring a constant in Pascal?

a)

const pi = 3.14;

b)

constant pi = 3.14;

c)

const pi := 3.14;

d)

pi := 3.14;

11.

What type of control structure is used in the following pseudocode?
if age >= 18 then

writeln('Adult') else

writeln('Minor')

a)

Loop

b)

Conditional

c)

Sequence

d)

Case

12.

Which of the following statements correctly describes a 'for' loop in Pascal?

a)

The loop executes at least once and checks the condition at the end.

b)

The loop checks the condition before executing the block.

c)

The loop continues indefinitely if the condition is never false.

d)

The loop uses a counter variable and runs a fixed number of times.

13.

What will the following pseudocode output?

for i := 1 to 3 do

writeln(i);

a)

1 2 3

b)

0 1 2

c)

3 2 1

d)

1 2 3 4

14.

In Pascal, what is the correct syntax for a 'while' loop?

a)

while condition do statement;

b)

while do condition statement;

c)

repeat statement while condition;

d)

condition while do statement;

15.

Which of the following is NOT a valid data type in Pascal?

a)

Integer

b)

Boolean

c)

Char

d)

Decimal

16.

What is the primary difference between a 'while' loop and a 'repeat-until' loop in Pascal?

a)

'While' loops execute at least once, 'repeat-until' loops do not.

b)

'While' loops check the condition after executing, 'repeat-until' checks it before.

c)

'Repeat-until' loops check the condition after executing, 'while' loops check it before.

d)

There is no difference between 'while' and 'repeat-until' loops.

17.

Which of the following is the correct syntax for a nested if-then-else statement in Pascal?

a)

if condition then statement1 else statement2;

b)

if condition then statement1 else if condition2 then statement2 else statement3;

c)

if condition then statement1 else if condition2;

d)

if condition1 then statement1 else if condition2 then statement2;

18.

In which step of the program implementation process is source code converted to machine code?

a)

Debugging

b)

Translation

c)

Execution

d)

Compilation

19.

What type of loop will execute at least once before checking the loop condition?

a)

For loop

b)

While loop

c)

Repeat-until loop

d)

Do-while loop

20.

Which operator is used for assignment in Pascal?

a)

=

b)

:=

c)

==

d)

=>

21.

What is the output of the following Pascal program?

pascal:

var x: integer;

begin

x := 5;

x := x + 3;

writeln(x);

end.

a)

5

b)

3

c)

8

d)

Error

22.

Which of the following control structures is used for decision-making?

a)

If-then-else

b)

While loop

c)

Repeat-until loop

d)

For loop

23.

Which of the following is NOT a relational operator in Pascal?

a)

<>

b)

<=

c)

&&

d)

>=

24.

What will be the final value of x after executing the following pseudocode?

pascal:

x := 1;

while x < 5 do

x := x + 2;

a)

3

b)

5

c)

7

d)

Infinite loop

25.

Which statement is used to take user input in Pascal?

a)

input(x);

b)

get(x);

c)

readln(x);

d)

accept(x);

26.

Which loop is best suited when the number of iterations is known beforehand?

a)

While loop

b)

Repeat-until loop

c)

For loop

d)

Infinite loop

27.

Which of the following expressions correctly increments a variable count by 1 in Pascal?

a)

count = count + 1;

b)

count := count + 1;

c)

increment(count);

d)

count += 1;

28.

What will the following Pascal program output?

var i: integer;

begin

for i := 3 downto 1 do

writeln(i);

end.

a)

1 2 3

b)

3 2 1

c)

Error

d)

3 1

29.

Which of the following is an example of erroneous test data?

a)

Inputting a string when a number is expected

b)

Entering a number within the expected range

c)

Using an input exactly at the boundary

d)

Entering a valid character input

30.

What is a trace table used for?

a)

To execute a program step-by-step

b)

To check variable values at different points

c)

To translate code to machine language

d)

To optimize program performance

31.

What will be the output of the following Pascal code?

var x: integer;

begin x := 10;

repeat

writeln(x);

x := x - 3;

until x < 5;

end.

a)

10 7 4

b)

10 7

c)

10

d)

Infinite loop

32.

What does the following flowchart symbol represent?

a)

Start/End

b)

Process

c)

Input/Output

d)

Decision

33.

What will be the output of the following Pascal program?

var i: integer;

begin

i := 1;

while i <= 3 do

begin

writeln(i);

i := i + 1;

end;

end.

a)

1 2 3

b)

1 3

c)

3 2 1

d)

Infinite loop

34.

Which of the following is NOT a type of loop?

a)

While

b)

If-Then

c)

For

d)

Repeat-Until

35.

What is the final value of sum after executing the following loop?

sum := 0;

for i := 1 to 3 do

sum := sum + I;

a)

3

b)

6

c)

1

d)

9

36.

What is the purpose of a compiler?

a)

Debugs the program automatically

b)

Translates the entire source code into machine code before execution

c)

Converts high-level language into assembly language

d)

Executes programs directly without translation

37.

Which type of testing checks the program with inputs at the boundary of valid ranges?

a)

Normal testing

b)

Boundary testing

c)

Erroneous testing

d)

Debugging

38.

What will be the output of the following Pascal program?

for i := 1 to 5 do

begin

if i = 3 then

break;

writeln(i);

end;

a)

1 2 3 4 5

b)

1 2

c)

3 4 5

d)

No output

39.

Which of the following best defines an algorithm?

a)

A set of rules for debugging programs

b)

A sequence of instructions to solve a problem

c)

A programming language

d)

A type of compiler

40.

Which of the following is NOT an arithmetic operator in Pascal?

a)

+

b)

-

c)

mod

d)

&

41.

What is the purpose of indentation in pseudocode?

a)

Makes it easier to read

b)

Prevents syntax errors

c)

Makes execution faster

d)

Allows input handling

42.

Which loop type does NOT require a counter variable?

a)

For loop

b)

While loop

c)

Repeat-until loop

d)

Both B and C

43.

Which of the following is an error in the given pseudocode?

BEGIN

x = 5

y = 0

WHILE x > 0

y = y + x

x = x - 1

ENDWHILE

END

a)

The loop condition is incorrect.

b)

The pseudocode is missing indentation.

c)

The variable y is not initialized.

d)

There is no error in the pseudocode.

44.

What will be the output of the following pseudocode?

BEGIN

x = 2

y = 3

result = x * y

PRINT result

END

a)

2

b)

3

c)

6

d)

5

45.

Which of the following flowchart symbols is used for decision-making?

a)

Rectangle

b)

Oval

c)

Diamond

d)

Parallelogram

46.

Which of the following flowchart symbols is used for input/output operations?

a)

Rectangle

b)

Parallelogram

c)

Diamond

d)

Circle

47.

Which of the following Pascal programs correctly implements a loop that prints numbers from 1 to 5?

a)

for i := 1 to 5 do

writeln(i);

b)

while i < 5 do

writeln(i);

c)

repeat

writeln(i);

until i > 5;

d)

for i := 1 to 4 do

writeln(i);

48.

What will be the output of the following Pascal program?

var x: integer;

begin

x := 10;

while x > 7 do

begin

writeln(x);

x := x - 1;

end;

end.

a)

10 9 8

b)

10 9 8 7

c)

10 9 8 7 6

d)

Infinite loop

49.

Which of the following statements about flowcharts is TRUE?

a)

A rectangle represents a decision-making step.

b)

A parallelogram represents an arithmetic operation.

c)

An oval represents the start or end of a flowchart.

d)

A diamond represents input/output operations.

50.

What is the purpose of a trace table in debugging?

a)

To check variable values at different steps of execution.

b)

To convert pseudocode into a high-level programming language.

c)

To execute a program step by step.

d)

To translate source code into machine code.

51.

Which of the following is an example of a nested loop in Pascal?

a)

for i := 1 to 5 do

begin

writeln(i);

end;

b)

while x > 0 do

writeln(x);

c)

for i := 1 to 3 do

begin

for j := 1 to 2 do

writeln(i, j);

end;

d)

repeat

writeln(x);

x := x + 1;

until x > 5;

52.

Which of the following statements best describes pseudocode?

a)

It is a formal programming language used to write executable code.

b)

It is a step-by-step description of an algorithm using structured English.

c)

It is only used for debugging programs.

d)

It must be compiled before execution.

53.

Which of the following is the correct sequence of steps in problem-solving?

a)

Design → Analyze → Implement → Test → Maintain

b)

Analyze → Design → Implement → Test → Maintain

c)

Implement → Design → Analyze → Test → Maintain

d)

Test → Analyze → Design → Implement → Maintain

54.

Which step in problem-solving involves breaking down the problem and understanding the requirements?

a)

Implementation

b)

Testing

c)

Analysis

d)

Maintenance

55.

During which phase of problem-solving is an algorithm or flowchart typically created?

a)

Implementation

b)

Analysis

c)

Design

d)

Testing