Which is correct with respect to size of the datatypes?
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. float f1 = 0.5; 6. double f2 = 0.5; 7. if (f1 == 0.5f) 8. cout << "equal"; 9. else 10. cout << "not equal"; 11. return 0; 12. }
Which is used to indicate single precision value?
What is the output of the following program?
1. #include2. using namespace std; 3. int main() 4. { 5. float i = 123.0f; 6. cout << i << endl; 7. return 0; 8. }
What is the output of this program?
1. #include2. #include 3. using namespace std; 4. int main() 5. { 6. cout << setprecision(17); 7. double d = 0.1; 8. cout << d << endl; 9. return 0; 10. }