C Programming :: Functions - Discussion
Home > C Programming > Functions > MCQs Questions Discussion
11 / 53
What is the following test function computing?
int test (n)
int n;
{
int i;
long int prod = 1;
if(n > 1)
for (i = 2; i < = n; i++)
prod *= i
return (prod);
}
int test (n)
int n;
{
int i;
long int prod = 1;
if(n > 1)
for (i = 2; i < = n; i++)
prod *= i
return (prod);
}
Acalculates the product of any n positive integers
Bcalculates the value of factorial n
Cchecks whether n is a non-negative integer
DNoneof these
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!