Q518
What will be the output of the following C++ code? #include using namespace std; long factorial (long a) if (a > 1) return (a * factorial (a + 1)); else return (1); int main () long num = 3; cout << num << "! = " << factorial ( num ); return 0;
A.
6
B.
24
C.
segmentation fault
AnswerD.
compile time error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board