Multiple Choice
Moderate
QWhich of the following variables has block scope?
ID: #24874
Control flow in programming
11 views
Question Info
#24874Q ID
ModerateDifficulty
Control flow in programmingTopic
Your Answer
Select All That Apply
Tick every correct option, then press Check Answer.
Correct Answer
Explanation
Correct Answer:
✅ (d) Local variable
Explanation:
Local variables exist only inside the block or method where they are declared.
Example:
void test(){
int x=10;
}
Here x exists only inside test().
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic