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
You might also like to view...
Which of the following statements are correct?
a. A Color object is immutable. b. A Font object is immutable. c. You cannot change the contents in a Color object once it is created. d. You cannot change the contents in a Font object once it is created.
Set the console password on the router to ciscopress and enable login. List the command sequence required to accomplish this task.
What will be an ideal response?
Which of the following definitions is the best description of an orphan?
A) The last word of a paragraph split across a line break B) The location of a file preceding the filename C) The last line split from the paragraph across a page break D) The amount of white space around the edge of each page
The feature that displays table column headings at the top of each page is
A. Page Header B. Repeat Header Rows C. Distribute Rows D. Distribute Columns