Search Header Logo

Subroutines and Procedures

Authored by Waqqad Rasheed

Computers

11th Grade

Used 1+ times

Subroutines and Procedures
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a subroutine in programming?

A) A set of instructions that performs a task and returns control to the main program.

B) A data type used to store numeric values.

C) A loop used for iterating through arrays.

D) An error that occurs during program execution

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of parameters in subroutines?

A) To declare variables within the subroutine.

B) To provide input data to the subroutine for processing.

C) To define the return type of the subroutine.

D) To specify the number of times a subroutine is called.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a flowchart, how is a subroutine typically represented?

A) With a Start box.

B) With a Decision box.

C) With a pair of parallel vertical lines at each side of a process box.

D) With a loop symbol.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of parameters in subroutine calls?

A) They define the return type of the subroutine.

B) They specify the number of times the subroutine is called.

C) They provide input data to the subroutine for processing.

D) They control the flow of execution within the subroutine.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which pseudocode command is used to declare a procedure?

A) START

B) FUNCTION

C) PROCEDURE

D) DECLARE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when a subroutine finishes running?

A) Control passes back to where it was called from.

B) The program terminates.

C) The subroutine returns to the start of the program.

D) The subroutine becomes the main program.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are parameters identified within a subroutine declaration?

A) By using quotation marks.

B) By using square brackets.

C) By using parentheses.

D) By using curly braces.

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?