What will be the output of the following C++ code?
#include <iostream>
#include <locale>
using namespace std;
int main()
{
locale mylocale("");
cout.imbue( mylocale );
cout << (double) 3.14159 << endl;
return 0;
}
#include <iostream>
#include <locale>
using namespace std;
int main()
{
locale mylocale("");
cout.imbue( mylocale );
cout << (double) 3.14159 << endl;
return 0;
}A. 3.14
B. 3.14159
C. Error
D. 3.69
Answer: Option B

Join The Discussion