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
You have verified that all your wireless settings are correct. What is most likely the problem if your laptop has recently been
alukav5142 [94]

Answer:

D) The antenna connector is not connected properly

Explanation:

The antenna of a laptop is inside the laptop and it is the antenna that gives access to wireless connection.Since the laptop has just been serviced, the antenna connector could have been inadvertently disconnected hence the antenna would not be able to function and wireless connectivity would not work.

8 0
2 years ago
What is retrieved from a search containing two terms separated<br> by the AND operator?
egoroff_w [7]

Answer:

A AND B= 1 or 0

1 1  1

0 1  0

1 0  0

0 0 0

So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.

Explanation:

If both are 1 we get 1 or always else, we get the output =0.

8 0
2 years ago
PLEASE HELP!!~~
Law Incorporation [45]

Answer:

A

Explanation:

7 0
2 years ago
OH GOD PLEASE HELP I CAN'T FIGURE THIS OUT-
Angelina_Jolie [31]

Answer:

what does that even mean like what is the problem in the question

5 0
2 years ago
Give a proof for each statement.
Marrrta [24]

Answer:

  • If a group of 9 kids have won a total of 100 trophies, then at least one of the 9 kids has won at least 12 trophies.
  • If a person buys at least 400 cups of coffee in a year, then there is at least one day in which the person has bought at least two cups of coffee.
  • The average of three real numbers is greater than or equal to at least one of the numbers.

Explanation:

1)

Suppose that  each kid has less than 12 trophies

Total trophies = 100

Maximum trophies won by one kid = 11

total kids = 9

total number of trophies = 9 * 11 = 99 which contradicts the fact the total number of trophies are 100

2)

Suppose that  person has less than 2 cups of coffee a day

Total cups of coffee = 400

he has bought at least one cup of coffee each day

which means

total number of cups of coffee = 1* 366 = 366 which contradicts the fact the person buys at least 400 cups of coffee in a year

3)

Average of three number = (a+ b+ c)/3

suppose that there are real numbers a, b, and c such  that all three numbers are less than the average of the three numbers.

Let m be the average (a+b+c )/3 = m. Then our assumption states that (a < m) and  (b < m) and (c < m). By adding all the inequalities we get a + b + c < 3m. But m is  defined to be (a+b+c) /3  , so a + b + c = 3m.  But now we have that 3m = a + b + c < 3m. So 3m < 3m which is an obvious  contradiction. Thus our claim is true

7 0
2 years ago
Other questions:
  • which of these paste options is commonly available from the paste options button? A&gt; use the destination them. B. keep the em
    14·2 answers
  • In cell e5, create a formula using the vlookup function to determine the dog type for teen anna morante based on the program cod
    13·2 answers
  • "use the ______ element to create logical areas on a web page that are embedded within paragraphs or other block formatting elem
    15·1 answer
  • Prove that f(n) = 20n3 + 10nlogn + 5 is O(n3)
    12·1 answer
  • 1. Show that the three security services-confidentiality, integrity, and availabilty- are sufficient to deal with the threats of
    10·1 answer
  • 1. PGP encryption can be performed from the command line as well. What is the PGP command line syntax to encrypt the my-message.
    7·1 answer
  • Array A is not a heap. Clearly explain why does above tree not a heap? b) Using build heap procedure discussed in the class, con
    15·1 answer
  • python (Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. T
    12·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!