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
adoni
2 months ago
7

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

Computers and Technology
1 answer:
Rzqust [1K]2 months ago
4 0

Answer:

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

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

            return 0;

      // if the size of intArr is zero

      if(size == 0)

          return 0; // not found

  else  

          {

            if(*(intArray+size-1) == *(ptr)) // check if (size-1)th element equals ptr

                   return 1; // return positive indication

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

         }

}

Explanation:

This is the complete part of the program.

You might be interested in
Which selections are possible for controlling the start time of audio playback? Check all that apply. Automatic Rewind when done
maria [1035]

Selecting the option to trim audio upon clicking would be your best answer

5 0
3 months ago
Your employer, yPlum Corporation is manufacturing two types of products: Mirabelle smartphone, and Blackamber laptop. The compan
Natasha_Volkova [1026]

Answer:

Refer to the explanation

Explanation:

Number of Mobiles=x1

Number of Workstations=x2

Constraints:

50x1 + 70x2 <= 1,60,000

250x1 + 700x2 <= 12,000,000

x1 >= 0 x2 >= 0

Objective function N(x1, x2) = 7800000000 x1 + 7200000000 x2

Excel formulae:

G17 = D9 * E7 + F9 * G7

G18= D10 * E7 * F10 * G7

G19= E7

G20= G7

G21= I17 * E7 + I18 * G7 (This will yield the Maximum)

And E7 and G7 will be the solution.

Set up your sheet as shown in the diagram and apply the formulas.

Access the tool and select solver. Upon opening the Solver dialog, confirm ‘Assume Linear model’ and ‘assume non-negative’. Click to solve the model and keep the solution.

7 0
2 months ago
Given an 10-bit two's complement binary number, what is the decimal value of the largest negative integer that can be represente
Natasha_Volkova [1026]
The largest negative integer is -512.
7 0
2 months ago
24. Which of the following statements about Emergency Support Functions (ESFs) is correct?
8_murik_8 [964]

(ESFs) is accurate: ESFs are not solely a federal coordinating mechanism.

5 0
4 months ago
Other questions:
  • Until 2015, each new Roblox user automatically had one friend. What was he called?
    12·2 answers
  • A company decides to relocate its operations to another state in order to take advantage of some new business investment credits
    15·1 answer
  • Q2 - Square Everything (0.25 points) Write a function called square_all that takes an input called collection that you assume to
    7·1 answer
  • The position of a runner in a race is a type of analog data. The runner’s position is tracked using sensors. Which of the follow
    8·1 answer
  • The act of infiltrating a remote computer system is called​
    14·1 answer
  • A company has deployed four 48-port access layer switches to a switch block. For redundancy each access layer switch will connec
    14·1 answer
  • Using the Sakila database, create a query that displays the film title, description, as well the actor first and last name for a
    12·1 answer
  • For a list of numbers entered by the user and terminated by 0. Write a program to find the sum of the positive numbers and the s
    10·1 answer
  • What is the name of the "local user" account involved in the alleged actions (Hint: where in the file structure did you find the
    11·1 answer
  • plato: The managing director of a company sends a Christmas greeting to all his employees through the company email. Which type
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!