[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

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

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 ::

Post Your Answer Here:     

No Discussion on this question yet!