Computer Science for IGCSE & O level - Programming (Section 10 - No. 49)

If a variable is declared inside a function, what scope does it have?
Global scope
Local scope
Program scope
File scope

Explanation

A variable declared within a function has local scope and is only accessible within that function.

Comments (0)

Advertisement