Home / MCQ Bank / Computer
Computer Functions And Procedures In C Plus Plus Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> using namespace std; double division(int a, int b) { if (b == 0) { throw "Division by zero condition!"; } return (a / b); } int main () { int x = 50; int y = 2; double z = 0; try { z = division(x, y); cout << z; } catch(const char *msg) { cerr << msg; } return 0; }

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following Python code? a={} a[2]=1 a[1]=[2,3,4] print(a[1][1]) Apache Storm added the open source, stream data processing to . . . . . . . . Data Platform. What is the formula used in quadratic probing? What is Hadoop's speculative execution policy for reducing job completion times? Which of the following command is not available in Tools menu in Ms Word?