Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started