If a variable is defined inside a user-defined function, what is its “scope”,…

PYQ KVS TGT/PGT 2026

If a variable is defined inside a user-defined function, what is its “scope”, and where can it be accessed?

  1. A.

    Global Scope; it can be accessed anywhere in the entire program.

  2. B.

    Local Scope; it can only be accessed within that specific function.

  3. C.

    Universal Scope; it is saved to the hard drive for future use.

  4. D.

    Static Scope; it can only be accessed by the main operating system.

Attempted by 1001 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…