Home / MCQ Bank / Computer
Computer Variables And Data Types In C Plus Plus

What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { float f1 = 0.5; double f2 = 0.5; if (f1 == 0.5f) cout << "equal"; else cout << "not equal"; return 0; }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • equal

Related Computer Questions

Which of the following protocols are used to configure trunking on a switch? 1. VLAN Trunk Protocol 2. VLAN 3. 802.1Q 4. ISL Which function can be used to move the pointer to the previous array position? What is the time complexity of the fastest known matrix multiplication algorithm? In the random page replacement algorithm, if the current page doesn't exist in the frame then it is replaced with which of the following page? What will be the output of the following Java code? class array_output { public static void main(String args[]) { char array_variable [] = new char[10]; for (int i = 0; i < 10; ++i) { array_variable[i] = 'i'; System.out.print(array_variable[i] + ""); } } }