What is the output of the following function call?

//function body
int factorial(int n)
{
int product=0;
while(n > 0)
{
product = product * n;
n—;
}
return product;
}

//function call
cout << factorial(4);

a. 4
b. 0
c. 24
d. 48

b. 0

Computer Science & Information Technology

You might also like to view...

____________ programmers specialize in developing system software such as operating systems, device drivers, security modules, and communications software.?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

What is wrong with the following function template (Other than the fact that it really does almost nothing)?

``` template int f( int & x ) { return x; } int main() { int y = 3, z; z = f(y); } ```

Computer Science & Information Technology