Question: c++ code only Question 17 (1 point) What is the output of the following function call? //function body int factorial(int n) { int product=0; while(n
c++ code only
Question 17 (1 point)

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
Question 17 options:
| 4 | |
| 0 | |
| 24 | |
| 48 |
Save
Question 18 (1 point)

What is decimal equivalent of the binary number 11011
Question 18 options:
Save
Question 19 (1 point)

What is the binary equivalent of the decimal number 39? (Don't include leading zeros)
Question 19 options:
Save
Question 20 (1 point)

Array can only store integers.
Question 20 options:
| True | |
| False |
Save
Question 21 (1 point)

The locations of the contents of an array can be spread out all over the memory.
Question 21 options:
| True | |
| False |
Save
Question 22 (1 point)

Arrays can be passed to functions.
Question 22 options:
| True | |
| False |
Save
Question 23 (1 point)

Which of the following function declarations correctly expect an array as the first argument?
Question 23 options:
| void f1(int array, int size); | |
| void f1(int& array, int size); | |
| void f1(int array[100], int size); | |
| void f1(float array[], int size); | |
| All of the above | |
| C and D | |
| A and B |
Save
Question 24 (1 point)

Given the following array:
| Position: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| Value | 1 | 4 | 9 | 13 | 17 | 21 | 32 | 36 | 40 | 49 |
What is the POSITION of the first element encountered in a binary search for the value 19? Question 24 options:
Save
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
