Discussion
A duplicate declaration in the same scope is detected by
Answer: A
Correct answer: looking the name up in the current scope before installing it
Only the current scope is searched, because a declaration in an enclosing scope is legitimately shadowed rather than duplicated. That single lookup before installation is what distinguishes an error from ordinary nesting, and it is why the check must happen at declaration rather than afterwards.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development