Docsity

Programming Procedures & Functions: Declaration, Arguments, & Access Specifiers, Quizzes of Software Engineering

Toggle sidebar
bg1
TERM 1
What is the format for declaring a procedure?
DEFINITION 1
[accessSpecifier] sub procedure name (parameter list)
StatementsEnd Sub
TERM 2
What are the 2 ways to pass an argument?
DEFINITION 2
By value and by reference
TERM 3
what is passing an argument by value?
DEFINITION 3
only a copy of the argument is passed to the procedure. It
cannot make changes to the original argument
TERM 4
what is passing an argument by reference?
DEFINITION 4
the procedure has access to the original argument and can
make changes to it.
TERM 5
How do you declare a
function?
DEFINITION 5
[accessSpecifier] Functionprocedure name(parameter list) As
DataType Statements Return statementEnd Function
pf3

Partial preview of the text

Download Programming Procedures & Functions: Declaration, Arguments, & Access Specifiers and more Quizzes Software Engineering in PDF only on Docsity!

TERM 1

What is the format for declaring a procedure?

DEFINITION 1

[accessSpecifier] sub procedure name (parameter list)

StatementsEnd Sub

TERM 2

What are the 2 ways to pass an argument?

DEFINITION 2

By value and by reference

TERM 3

what is passing an argument by value?

DEFINITION 3

only a copy of the argument is passed to the procedure. It

cannot make changes to the original argument

TERM 4

what is passing an argument by reference?

DEFINITION 4

the procedure has access to the original argument and can

make changes to it.

TERM 5

How do you declare a

function?

DEFINITION 5

[accessSpecifier] Functionprocedure name(parameter list) As

DataType Statements Return statementEnd Function

TERM 6

what is a procedure

DEFINITION 6

A collection of statements that performs a task

TERM 7

what is a function?

DEFINITION 7

a collection of statements that performs a task and then

returns a value to the part of the program that executed it.

TERM 8

what is a static local variable, and what is it

used for?

DEFINITION 8

The variable is stored in a local variable. These variables are

not destroyed when a procedure terminates. They will exist

for the lifetime of the application. example: Static variable

name As Datatype

TERM 9

What are the different access specifiers?

DEFINITION 9

prive, public, protected, friend, and protected frined

TERM 10

What statement does a function must have

in?

DEFINITION 10

Return statement