#8 Procedural programming

#8 Procedural programming

20 Qs

quiz-placeholder

Similar activities

Story of Us: Episode 8 (Canada) French

Story of Us: Episode 8 (Canada) French

KG - University

20 Qs

FinalTest 1stSem 24-25 M3

FinalTest 1stSem 24-25 M3

9th - 12th Grade

20 Qs

EMPRESA II BLOC 4 EL PROJECTE EMPRESARIAL

EMPRESA II BLOC 4 EL PROJECTE EMPRESARIAL

KG - University

20 Qs

PENILAIAN HARIAN T2ST2

PENILAIAN HARIAN T2ST2

KG - University

25 Qs

FREE TEST  9

FREE TEST 9

9th Grade

20 Qs

EMPRESA II BLOC 3 DIRECCIÓ ESTRATÈGICA I CREIXEMENT EMPRESARIAL

EMPRESA II BLOC 3 DIRECCIÓ ESTRATÈGICA I CREIXEMENT EMPRESARIAL

KG - University

17 Qs

IPA CHECK

IPA CHECK

9th - 12th Grade

17 Qs

#8 Procedural programming

#8 Procedural programming

Assessment

Quiz

others

Practice Problem

Medium

Created by

Jan Corboy

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What is the key difference between a procedure and a function?

A. A function always returns an integer value, unlike a procedure, which returns a Boolean
B. A procedure always returns a value but in functions this is optional
C. A function always returns a value whereas a procedure never does
D. Procedures have global scope whereas functions have local scope

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. Which of these rules is true?

A. Functions require parameters but procedures do not
B. It is not essential to provide parameters to all functions or all procedures, but certain functions and procedures will require them
C. Procedures require parameters but functions do not
D. Functions and procedures always require parameters

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. What is meant by the 'return type' of a function?

A. Whether the function is indented or not
B. Whether it is a function or a procedure
C. The data type of the value that the function produces when it completes
D. The data type of the parameter taken in by the function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. Which of the following is not compulsory when coding a function?

A. An identifier (a function name)
B. A return type
C. A return statement
D. A parameter

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. Which of these is a true statement about the scope of a variable?

A. If a variable is declared within a function, it typically has global scope unless otherwise stated
B. If a variable is declared within a function, it typically has local scope unless otherwise stated
C. If a variable is declared within a function, it can be accessed easily from other functions
D. If a variable is declared outside of a function, the various functions of that program cannot typically access it directly

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. What is considered good practice when considering scope rules?

A. Make widespread use of global variables to improve the accessibility of all variables
B. Make some global variables and then make some local variables using the same variable names as you used for the global variables as this will aid understanding of your program
C. Try to use approximately 50:50 global and local variables in your program
D. Stick mainly to local variables and pass values around as parameters rather than using global variables in most cases

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. What is meant by 'pass by value'?

A. When a variable is passed to a subprogram, any changes made in the subprogram will be reflected in the original variable as well
B. The variable will be passed as a parameter without using the variable name
C. A second copy of the variable's value will be passed into the subprogram and any changes will only affect that second copy and not the original variable itself
D. When a data structure such as an array is passed to a subprogram, the subprogram will only use the first value

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?