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
SashulF [63]
3 years ago
7

Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of

integers whose size is the product of the 2 array sizes. The function should loop through the second array and multiplies each element across each element of array 1 and store the product in the newly created array. The function should return a pointer to the newly allocated array.
Computers and Technology
1 answer:
andrew-mc [135]3 years ago
5 0

Answer:

The function C is as follows:

int *apply_all(int arr1[], int arr2[], int size) {

  int result[size];

  for(int i =0; i<size;i++){

      result[i] = arr1[i] * arr2[i];

      printf(" %d", result[i]);

  }

  return result;

}

Explanation:

This line defines the function

int *apply_all(int arr1[], int arr2[], int size) {

This declares an array that holds the result of the function

  int result[size];

This iterates through the array

  for(int i =0; i<size;i++){

This multiplies the corresponding elements of both arrays

      result[i] = arr1[i] * arr2[i];

This prints the result of the multiplication

      printf(" %d", result[i]);

  }

This return the a pointer to the new array

  return result;

}

<em>See attachment for complete program that includes the main</em>

Download cpp
You might be interested in
Why vechiles Tyres are black in colour?​
kirza4 [7]

Answer: See explanation

Explanation:

It should be noted that the rubber that tire is made from has a color that's milky white but due to the fact that carbon black is being added to the rubber, then the tire will turn to black.

The importance of carbon black to tires is immense as it acts as the stabilizing chemical compound. Also, it helps in increasing the strength of the tire and its durability and also protects the tire from ozone effect.

5 0
3 years ago
Describe the features of agile modeling​
Allushta [10]

Answer:

si gigi hadid tapos si bella poarch

Explanation:

7 0
3 years ago
__________ has become a widely accepted evaluation standard for training and education related to the security of information sy
kirill115 [55]
NSTISSI NO 4011 has become a widely accepted evaluation standard for training and education related to the security of information system. The standard is directed at information security professionals who are experts in identifying system vulnerabilities, investigating system security, documenting, analyzing and evaluating system security technology policies.<span />
4 0
3 years ago
You are querying a database of manufacturing company suppliers. The column name for supplier identification numbers is supplier_
irina1246 [14]

Queries are used to retrieve data from the database

The correct clause to retrieve only data about the supplier with identification number 85317 is WHERE supplier_id = 85317

<h3>How to determine the query</h3>

The clause is given as:

identification number = 85317

To retrieve data from the database, we make use of the WHERE clause followed by the column name, and the column value

In this case,

supplier_id represents the column name, while 85317 represents the value

Hence, the required clause is

WHERE supplier_id = 85317

Read more about database at:

brainly.com/question/1538272

8 0
2 years ago
Diane changes the size of an image with the format picture pane and keeps the original ratio of height to width of the object. W
bixtya [17]

Answer:

it's d.  

Explanation: post protected

7 0
3 years ago
Other questions:
  • How do I give extra points on Brainly
    6·2 answers
  • It's inventiveness, uncertainty futuristic ideas typically deal with science and technology.what is it?
    14·1 answer
  • 6.6 Write a function named timesTen. The function should have an integer parameter named number. When timesTen is called, it sho
    7·1 answer
  • "When an interrupt or a system call transfers control to the operating system, a kernel stack area separate from the stack of th
    11·1 answer
  • If you embed a Word table into PowerPoint, what happens when you make edits to the embedded data? A. Edits made to embedded data
    12·1 answer
  • For the following scenario, indicate whether the action is a good practice or bad practice for safeguarding your personally iden
    6·1 answer
  • A successful web-based strategy that helps a business spread the word about its website and products is called:
    15·1 answer
  • Point out the wrong statement.
    10·1 answer
  • Đánh giá hoạt động thanh toán điện tử của sinh viên
    6·1 answer
  • Fill this blanks with the given words​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!