136. OCR A Level (H046-H446) SLR23 – 2.2 Functions & procedures

136. OCR A Level (H046-H446) SLR23 – 2.2 Functions & procedures

11th Grade

15 Qs

quiz-placeholder

Similar activities

G11- Problem Solving 1

G11- Problem Solving 1

11th Grade

13 Qs

Object Orientated Programming (BTEC Computing)

Object Orientated Programming (BTEC Computing)

11th - 12th Grade

18 Qs

Module 2 - Lesson 7

Module 2 - Lesson 7

6th - 12th Grade

13 Qs

Python Arrays

Python Arrays

9th - 12th Grade

13 Qs

C++ quiz

C++ quiz

10th Grade - Professional Development

10 Qs

Comments and Variables in Python Programming

Comments and Variables in Python Programming

11th Grade

10 Qs

Understanding Python Basics

Understanding Python Basics

8th Grade - University

14 Qs

Python Test

Python Test

8th - 12th Grade

20 Qs

136. OCR A Level (H046-H446) SLR23 – 2.2 Functions & procedures

136. OCR A Level (H046-H446) SLR23 – 2.2 Functions & procedures

Assessment

Quiz

Computers

11th Grade

Hard

Created by

James Cole

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is modularity in programming?

The practice of writing code in a single, large block

The concept of breaking a large program into smaller chunks

The process of writing code without errors

A method of passing parameters by value

Answer explanation

Modularity in programming refers to the concept of breaking a large program into smaller, manageable chunks, making the code more organized and easier to maintain.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a procedure?

A procedure returns a value, while a function does not

A function returns a value, while a procedure does not

A function can only take one parameter, while a procedure can take multiple

There is no difference between a function and a procedure

Answer explanation

A function returns a value, while a procedure does not

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does parameter passing by value mean?

A copy of the variable is passed to the subroutine

A pointer to the original variable is passed

The value is passed by reference

The original variable is directly modified

Answer explanation

Parameter passing by value means a copy of the variable is passed to the subroutine, not the original variable itself.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does parameter passing by reference mean?

A pointer to the original variable is passed

The original variable cannot be modified

The value is passed by value

A copy of the variable is passed to the subroutine

Answer explanation

Parameter passing by reference means a pointer to the original variable is passed, allowing modifications to the original variable within the subroutine.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it a good idea to develop code in a modular way?

It requires more memory

It prevents the code from being executed

It allows for code to be reused in different parts of a program

It makes the code harder to understand

Answer explanation

Developing code in a modular way allows for code to be reused in different parts of a program, increasing efficiency and reducing redundancy.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of passing a parameter by reference and modifying it?

The original variable is unaffected

The copy of the variable is modified

The original variable is modified

A new variable is created

Answer explanation

The original variable is modified

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a common way to output text to a console in C#?

print()

System.out.println()

echo()

Console.WriteLine()

Answer explanation

The correct way to output text to a console in C# is by using Console.WriteLine().

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?