#8 Procedural programming

#8 Procedural programming

20 Qs

quiz-placeholder

Similar activities

ICT Theme 4 Test

ICT Theme 4 Test

5th Grade

15 Qs

Saber vs. Conocer

Saber vs. Conocer

KG - University

20 Qs

Place Value (January Winter 4th 5th Grade Math Kahoot!) Fourth Grade Fifth Grade

Place Value (January Winter 4th 5th Grade Math Kahoot!) Fourth Grade Fifth Grade

KG - University

15 Qs

4.8 Virginia's Natural Resources SOL Review

4.8 Virginia's Natural Resources SOL Review

5th Grade

20 Qs

PAT (PJOK VIII AB)

PAT (PJOK VIII AB)

KG - University

22 Qs

Tomás Carlos Heras García_Curso

Tomás Carlos Heras García_Curso

KG

23 Qs

24-25.SocialStudies.USHistory1.Benchmark3

24-25.SocialStudies.USHistory1.Benchmark3

6th - 8th Grade

25 Qs

PERR MP03 UF2 Cosmètics color

PERR MP03 UF2 Cosmètics color

KG - University

25 Qs

#8 Procedural programming

#8 Procedural programming

Assessment

Quiz

others

Practice Problem

Medium

Created by

Claire Buckler

Used 7+ 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?