We have two namespaces, each declaring a variable named threshold. Your task is to declare both namespaces and variables.
int threshold = 50
int threshold = 75
The code already print both values using the scope resolution operator.
Example
Output:
A.threshold=50 B.threshold=75
Why this output?
Both namespaces contain a threshold. Using A::threshold and B::threshold selects the intended one.
Question Significance
Teaches how namespaces prevent name collisions and how to access identically named items across different namespaces.
Test Cases
Test Results
Input
Expected Output