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; int main() { int age = 0; try { if (age < 0) { throw "Positive Number Required"; } cout << age; } catch(const char *Message) { cout << "Error: " << Message; } return 0; }

Select the correct option to test your answer:

More Computer Questions

In Java, can a method have the same name as the class? _____________ and elements in a document may be dragged using the application/x-moz-node type. If a string is to be converted to a number, it is converted into a . . . . . . . . What will be the output of the following C# code? static void Main(string[] args) { String a = "Ilove"; String b = "CSHARP"; b = string.Concat(a,' ',b); string d = b.TrimStart('I', 'l', 'o', 'H'); Console.WriteLine(d); Console.ReadLine(); } All the instructions and procedures needed to start up a computer, to the point it can load an operating system, are stored in ROM chips. In IBM compatible PCs this is called the _______ .