nerdexam
Microsoft

98-361 · Question #333

You are developing a C# program. You write a recursive method to calculate the factorial of a number. Which of the following code segment should you use to generate correct results?

The correct answer is A. public static int Factorial(int n). See the full explanation below for the reasoning.

Question

You are developing a C# program. You write a recursive method to calculate the factorial of a number. Which of the following code segment should you use to generate correct results?

Options

  • Apublic static int Factorial(int n)
  • Bpublic static int Factorial(int n)
  • Cpublic static int Factorial(int n)
  • Dpublic static int Factorial(int n)

How the community answered

(45 responses)
  • A
    80% (36)
  • B
    13% (6)
  • C
    2% (1)
  • D
    4% (2)

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice