Question
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
int main()
5.
{
6.
cout
Answer: Option B
Was this answer helpful ?
The double had to truncate the approximation due to it’s limited memory, which resulted in a number
that is not exactly 0.1.
Output:
$ g++ float2.out
$ a.out
0.10000000000000001
Was this answer helpful ?
Submit Solution