What will be the output of following C++ code?
#include <iostream>
#include <string>
using namespace std;
namespace My_old_school_and_college_friends_number
{
long int f1 = 9999999999;
long int f2 = 1111111111;
}
namespace contacts = My_old_school_and_college_friends_number;
int main(){
cout<<contacts::f1;
}
#include <iostream>
#include <string>
using namespace std;
namespace My_old_school_and_college_friends_number
{
long int f1 = 9999999999;
long int f2 = 1111111111;
}
namespace contacts = My_old_school_and_college_friends_number;
int main(){
cout<<contacts::f1;
}A. 9999999999
B. 1111111111
C. error
D. segmentation fault
Answer: Option A

Join The Discussion