What is the following test function computing?


Loading

โœช Choose the correct option.

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);

}

A. calculates the product of any n positive integers
B. calculates the value of factorial n
C. checks whether n is a non-negative integer
D. Noneof these