Search Header Logo

2.2.1 Variables and Functions

Authored by Robin Smith

Computers

12th Grade

Used 17+ times

2.2.1 Variables and Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a procedure?

They are the same

A function returns a value

A procedure returns a value

A function can only be called from a procedure

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the name used for the data passed to a subroutine in parentheses e.g. x and y in the example below.


multiply( x , y )

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the name for the local variables declared in the parentheses of a subroutine definition e.g. a and b in the example below.


function multiply (a, b)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

8 10

10 8

6 0

0 6

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of parameter passing allows a subroutine to change the value of an argument in the calling routine?

pass by value

pass by reference

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of parameter passing is when the value of the argument is copied to the local parameter variable?

pass by value

pass by reference

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following represents labels that represent values in memory that can be changed during program execution?

Variables

Constants

Data types

Subroutines

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers