Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please I need help as soon as possible Linear search can be used on: Integer arr

ID: 3752129 • Letter: P

Question

Please I need help as soon as possible

Linear search can be used on:

Integer arrays

Which of the following statement is assigning the address of variable number1 to pointer variable doublePtr?

Assume that double variables number1 and number2 have been declared and that number1 has been initialized to 7.3.

*doublePtr = &number1;

doublePtr = &number1;

doublePtr = number1;

Which of the following statement is declaring a pointer nPtr that points to a variable of type double?

double* nPtr;

double nPtr*;

*double nPtr;

Any of the above.

Explanation / Answer

Please find the answers for the given 3 Questions .

Answers:

For Question 1 ) ANSWER : Any of the Above , Linear Search Can be used on both Sorted and Unsorted Arrays. Only for Binary Search we need a Sorted array .

For Question 2 ) ANSWER : *doublePtr = &number1 (which passes the address of number1 to the pointer variable doublePtr.

For Question 3 ) ANSWER : double* nPtr (declaring a pointer nPtr that points to a variable of type double ).

Thanks..