A

Admin • 833.24K Points
Coach

Q. What is the output of the following C++ code?

Code:
#include <iostream>
using namespace std;
main()
{
double x = 15.564702;
float y = 5.99;
int z ,w;
z = (int) x;
w = (int) y;
cout << z <<<< w;
return 0;
}
  • (A) 15 6
  • (B) 14 6
  • (C) 15 5
  • (D) None of the above
  • Correct Answer - Option(C)
  • Views: 37
  • Filed under category C++
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.