-
What is the output of this program?
#include
using namespace std;
main()
{
double num = 23.9399;
float num0 = 20.23;
int p ,q;
p = (int) num;
q = (int) num0;
cout << p <<' '<< q;
return 0;
}
-
- 20 23
- 23.9399
- 20.23
- 23 20
- None of these
Correct Option: D
In this program, we are casting the operator to integer, So it is printing as 23 and 20.