Solved

What Happens When Two Blocks, One Nested Inside of the Other

Question 39

Multiple Choice

What happens when two blocks, one nested inside of the other, both declare variables with the same identifier? (Assume that the outer block declares its variable before the opening left-brace of the inner block.)


A) A syntax error occurs.
B) The "outer" variable is hidden while the "inner" variable is in scope.
C) The "outer" variable is irretrievably lost when the "inner" variable is declared.
D) The "inner" declaration is ignored and the "outer" variable has scope even inside the inner block.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents