No products in the cart.

What are local and global scope …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

What are local and global scope of variables?
  • 1 answers

Yogita Ingle 4 years, 3 months ago

A local variable is a type of variable declared within programming block or subroutines. It can only be used only inside that subroutine or code block in which they were declared. The local variable exists until the block of the function is in under execution. After that, it will be destroyed automatically.

Global variables are defined outside of a subroutine or function. The global variable will hold its value throughout the lifetime of a program. They can be accessed within any function defined for the program.

http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App