Question: ASAP Using the class code example located in Lec 3 Folder to implement the seqential search algorithm. Use the array that is defined by pArray,

ASAP

Using the class code example located in "Lec 3 Folder" to implement the seqential search algorithm. Use the array that is defined by pArray, the pointer of an array. You can also use some code related to Code Practice 1.

The output still to check if 160 is in the pArray or not. You can define your own pArray.

Code:

#include  #include  int main() { int i; int n=10; // pointers int *pArray; // pArray is a pointer of an array int *pNum; // a pointer for an int pNum= &n; // & is the address of integer n =10 std::cout << " address of n = "<< &n<<" "; std::cout << " content of pNum = "<< *pNum<<" "; pArray= new int (16); // new always create a pointer!!! // this is to allocate memory for pArray // It is not init yet. Some data may be exit at the location for (i=0;i<16;i++){ std::cout << "pArray ["<                                            

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!