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)

c++ code only Question 17 (1 point) What is the output of

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)

the following function call? //function body int factorial(int n) { int product=0;

What is decimal equivalent of the binary number 11011

Question 18 options:

Save

Question 19 (1 point)

while(n > 0) { product = product * n; n; } return

What is the binary equivalent of the decimal number 39? (Don't include leading zeros)

Question 19 options:

Save

Question 20 (1 point)

product; } //function call cout Question 17 options: 4 0 24 48

Array can only store integers.

Question 20 options:

True
False

Save

Question 21 (1 point)

Save Question 18 (1 point) What is decimal equivalent of the binary

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)

number 11011 Question 18 options: Save Question 19 (1 point) What is

Arrays can be passed to functions.

Question 22 options:

True
False

Save

Question 23 (1 point)

the binary equivalent of the decimal number 39? (Don't include leading zeros)

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)

Question 19 options: Save Question 20 (1 point) Array can only store

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!