We have already declared a nested namespace structure:
namespace Config { namespace ADC { int resolution = 12; } namespace PWM { int frequency = 1000; } }
Your task is to print these variables in main() in the following format:
main()
ADC.resolution=12 PWM.frequency=1000
Example
Output:
Why this output?
Because Config::ADC::resolution and Config::PWM::frequency are accessed using their full namespace paths.
Question Significance
This reinforces how to access variables from nested namespaces using scope resolution.
Test Cases
Test Results
Input
Expected Output