Q. What is the output of this program?
Code:#include
using namespace std;
long fact (long p)
{
if (p > 1)
return (p * fact (p + 1));
else
return (1);
}
int main ()
{
long n = 6;
cout << n << "! = " << fact ( n );
return 0;
}
β
Correct Answer: (C)
segmentation fault