What is the difference between local and global variables?

Local variables are defined within a subroutine. Their scope/visibility ends when the cursor leaves the subroutine.
Global variables on the other hand are variables that exist outside of all the subroutines and functions, and are available to all of them.

Answered by Chris D. Computing tutor

5901 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

Explain indexed addressing including the benefits when traversing certain data structures (4 Marks)


State the main features of a tree


Describe how wireless networks make use of the CSMA/CA method along with RTS/CTS to transmit data reliably between devices


When data is transmitted over long distances, latency can become an issue. Explain what latency is.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy