Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
float i = 123.0f;
6.
cout
What is the output of the following program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
float i = 123.0f;
6.
cout
Answer: Option C
Was this answer helpful ?
The value 123 is printed because of its precision.
$ g++ float.cpp
$ a.out
123
Was this answer helpful ?
Submit Solution