answer.
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]
2 years ago
7

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

Computers and Technology
1 answer:
Paladinen [302]2 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
Which of the following is true of how computers represent numbers?
Bumek [7]

Answer:

C. Binary can be used to represent more complex, higher level abstractions, including but not limited to numbers, characters, and colors. D. When data is large enough computers switch to using decimal representation instead of binary, because you can represent larger numbers with fewer digits

Explanation:

4 0
2 years ago
Read 2 more answers
Propane also known as LP gas, is often mixed with about _______ percent of other gases, such as butane, propylene, and mercaptan
vitfil [10]

Answer:

30

Explanation:

Java - Using a method, how do I "write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. Your program must define and call the following method that returns the number of times the input character appears in the input string.

public static int countCharacters(char userChar, String userString)"

4 0
2 years ago
Use the image below to answer this question.
Leviafan [203]

Answer:

The question given is incomplete as it does not contains the image. I have found the image of the question and it is attached below.

The solution of the question is also attached below in the image.

I hope it will help you!

Explanation:

4 0
2 years ago
Have you ever tried to teach a class full of restless, active sixth-graders? I have. I taught sixth-grade students for 12 years.
Illusion [34]

1.the average class size at Harbor Elementary School is 32.    

2.The National Education Association recommends a class size of 23.

3. She taught sixth-grade students for 12 years.

Hope this helps:)

5 0
2 years ago
What data unit is encapsulated inside a packet?<br> frame<br> datagram<br> segment<br> session
AVprozaik [17]
The answer is frame
8 0
2 years ago
Read 2 more answers
Other questions:
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • An mp3 takes up about 16 kilobytes of memory per second of music. if you owned a one terabyte hard drive and filled it with only
    15·1 answer
  • Who are the founders of video-sharing site Dailymotion?
    7·1 answer
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
    14·1 answer
  • For any element in keysList with a value greater than 50, print the corresponding value in itemsList, followed by a space. Ex: I
    8·1 answer
  • In cell J4, calculate
    8·1 answer
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • Which of the following Teacher Tips would NOT be helpful when trying to select content from the Chrome Web Store? "Can be used a
    9·1 answer
  • 1.the following code example would print the data type of x, what data type would that be?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!