Question: (a) Give an example of a function prototype. (2 marks) (b) Describe how a linear search works. On average, how many comparisons must a
(a) Give an example of a function prototype. (2 marks) (b) Describe how a linear search works. On average, how many comparisons must a linear search perform? (c) On what part of memory are variables declared using new stored? (2 marks) (1 mark) (3 marks) (d) What is output by the following program? 1 #include 2 using namespace std; 3 4 int main() 5 { 56678901 6}}; 10 int array[ 3 ][ 4 ] = {{1, 2, 3, 4}, {2, 3, 4, 5},{3, 4, 5, for (int i = 0; i < 3; I++ ) { for (int j = 0; j < 4; j++ ) { 11 12 13. 14 15 } 16 } // end main cout < < array[i][j] < < } cout < < endl; "1 Activa Go to Se
Step by Step Solution
There are 3 Steps involved in it
Lets go through each question one by one a Give an example of a function prototype A function protot... View full answer
Get step-by-step solutions from verified subject matter experts
