We have already created a nested namespace:
namespace Communication { namespace I2C { int speed = 400000; // 400 kHz } }
Your task is to:
Communication::I2C
The program should print:
I2C Speed: 400000
Example
Output:
Why this output?
The alias CI is just a shortcut name for Communication::I2C, so CI::speed refers to the same variable.
CI::speed
Question Significance
Shows how namespace aliasing shortens long namespace paths, making code cleaner and easier to maintain.
Test Cases
Test Results
Input
Expected Output