#include <iostream> using namespace std; namespace Boot{ namespace UART { void send(){ cout<<"BOOT UART";} } } namespace App{ namespace UART{ void send() {cout<<"APP UART";} } } // Create namespace Boot with nested namespace UART // Create namespace App with nested namespace UART int main() { int mode; cin >> mode; if(mode==1){ Boot::UART::send(); }else if(mode == 2 ){ App::UART::send(); } // Call correct send() function here return 0; }
Test Cases
Test Results
Input
1
Expected Output
BOOT UART