1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Brilliant_brown [7]
3 years ago
7

Return 1 if ptr points to an element within the specified intArray, 0 otherwise.

Computers and Technology
1 answer:
Paladinen [302]3 years ago
4 0

Answer:

int withinArray(int * intArray, int size, int * ptr) {

      if(ptr == NULL) // if ptr == NULL return 0

            return 0;

      // if end of intArr is reached

      if(size == 0)

          return 0; // element not found

  else  

          {

            if(*(intArray+size-1) == *(ptr)) // check if (size-1)th element is equal to ptr

                   return 1; // return 1

            return withinArray(intArray, size-1,ptr); // recursively call the function with size-1 elements

         }

}

Explanation:

Above is the completion of the program.

You might be interested in
Characteristics of first generation computers​
Marrrta [24]
* Main Electron a component- vacuum tube.

* Main memory- Magnetic drums and magnetic tapes.

* Programming language- Machine language.

* Power- Consume a lot of electricity and generate a lot of heat.

* were expensive to operate
5 0
3 years ago
When you hear the word “stress” what does it mean to you? How does stress affect you and what do you do to cope with stress
stepan [7]

   Ways to Cope with  Stress

  • Re-balance Work and Home.
  • Build in Regular Exercise.
  • Eat Well and drink lots of water.
  • Connect with Supportive People.
  • Carve out Hobby Time.
  • Practice Meditation, Stress Reduction or Yoga.
  • Sleep Enough.
  • Bond with Your Pet.

 

hope it helps! :)

3 0
3 years ago
When is a handrail required for stairs
ch4aika [34]

Answer: when is not able to get up the stairs like a normal person

Explanation:

5 0
3 years ago
Read 2 more answers
You are the IT security administrator for a small corporate network. Due to some recent restructuring, Corey Flynn (flynn) no lo
astra-53 [7]

Explanation:

The said action sof removing cflynn from HR group and keeping in other can be done by following;

First open the command prompt, type user group name of cflynn. Upon pressing enter a list of all group in which cflynn belongs would be displayed.

We see that Cflynn belong sto mgmt1 group

Now to change its status in this group; Type usermod -G mgmt1,it cflynn and press Enter to take out cflynn from this group

To keep him in other groups, type the usermod -G command enlisting all groups to which cflynn must belong.

5 0
4 years ago
Why is Touchpad used in the laptop computer​
Ber [7]

Answer:

in controlling the mouse or cursor

Explanation:

as is it known tha a cursor is a poniting device. and the only way to control it without a mouse is the touchpad

3 0
3 years ago
Other questions:
  • A machine called a centrifuge is used in _____.
    8·1 answer
  • Need help . business and technology
    11·1 answer
  • Why is it difficult to enforce laws against intellectual theft?
    9·1 answer
  • Please help! i need to answer this soon!
    13·1 answer
  • Katla is a project manager. One of the programmers on her team comes to her and says that he permanently deleted some code mista
    5·1 answer
  • Write a number guessing game. The game should have a default 1-100 picking system. Have the user guess the number the computer p
    12·1 answer
  • Which type of word processing programs enables users to include illustrations within the program?
    10·2 answers
  • ANSWER ASAP! 50 POINTS!!!!
    10·2 answers
  • 4. Cash inflows from investing activities normally arise from all of the following EXCEPT
    14·1 answer
  • 3. What report shows what mobile devices were used to view a website?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!