Home / MCQ Bank / Computer
Computer Classes And Objects In C Sharp

What will be the output of the following C# code snippet? class maths { int fact(int n) { int result; if (n == 1) return 1; result = fact(n - 1) * n; return result; } } class Output { static void main(String args[]) { maths obj = new maths() ; Console.WriteLine(obj.fact(4)*obj.fact(2)); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • 48

Related Computer Questions

In NiFi, what is the function of the "controller service"? What is the syntax of overloading operator + for class A? What is the use of description field in table design window? In a stack, what does the push operation do? Which shortcut key is used to export data of any company in Microsoft Excel spreadsheet or in any other company