Sub Programs (OCR GCSE Computer Science): Quizzes

📚Quizzes
Sub Programs
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

What are sub programs used for?

To structure larger programs

What is the key difference between functions and procedures?

Functions return a value, procedures don't

What does a function do after performing a task?

Returns a value

What type of sub program would you use to print output without returning a value?

Procedure

How do sub programs help improve code structure?

By avoiding repetition

What is modular programming?

Each part does one thing and is reusable

When should you use sub programs?

For repetitive tasks

When should you use a function rather than a procedure?

When returning a specific result

Where are local variables declared and where can they be accessed?

Inside a sub program; within it only

Where are global variables accessible?

Throughout the entire program

What is a risk of using global variables?

Unintended side effects

What can be done with arrays in sub programs?

Passed to and returned from them

Explore OCR GCSE Computer Science Revision Notes by Topics

Explore OCR GCSE Computer Science Model Answers by Topics

Explore OCR GCSE Computer Science Flashcards by Topics

Explore OCR GCSE Computer Science Exam Questions by Topics

Join 100,000+ GCSE students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.