Which of the following statements is accurate about variable scope? - ProProfs Discuss
Topics
Products
Follow Us:

Which of the following statements is accurate about variable scope?

Which of the following statements is accurate about variable scope?

Change Image    Delete



A. Sub-blocks cannot reuse a parent block s variable name
B. Parallel blocks can use the same variable name
C. A variable can be defined at any point in a block
D. A static variable can restrict the scope to the current block if its values is null
E. Sub-blocks can reuse a parent´s block variable name if its value is null

This question is part of Platform Dev 1
Asked by Raviteja, Last updated: Jan 18, 2020

+ Answer
Request

3 Answers

John Smith

John Smith

Answered Oct 25, 2016

1. Sub-blocks cannot reuse a parent block s variable name.
2. Parallel blocks can use the same variable name.
3. A variable can be defined at any point in a block.

1
 

f.Brian

F.Brian

Answered Jan 28, 2018

Variable scopes are related to C++ programming. There are three different places within a program where variable scopes can be declared. These three places include inside a function or block which is called local variables, in the definition of function parameters or formal parameters, or outside of all functions which is called global variables.

A few accurate statements about variable scopes would be that sub-blocks cannot reuse a parent block’s variable name, parallel blocks can use the same variable name, and a variable can be defined at any point in a block.

 

John Adney

John Adney

Answered Mar 23, 2017

In option 1 do you mean reuse as redeclare? then this choice is correct.
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.