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.

Answers

Answer 1

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;

}

See attachment for complete program that includes the main


Related Questions

Use the drop-down tool to select the phrase that completes each sentence,
In Windows, deleted files go to the
If you want to see the most information about a file, you can view them in
A file manager can help you
DONE
I

Answers

Answer:

1. recycle bin

2. details view

3. move a file

Explanation:

i did the assignment on edge. and got it right

Answer:

In Windows, deleted files go to the

✔ Recycle Bin

If you want to see the most information about a file, you can view them in

✔ details view

A file manager can help you

✔ move a file

Explanation: Hope it helps ^w^

Thale cress is a plant that is genetically engineered with genes that break down toxic materials. Which type of organism is described?
recombinant
transgenic
transverse
restriction

Answers

Answer: Transgenic

Explanation:

Since the thale cress is a plant that is genetically engineered with genes that break down toxic materials, the type of organism that is described here is the transgenic plant.

Transgene is when a gene is naturally transferred or transferred from an organism to another organism by genetic engineering method.

Therefore, the correct option is transgenic.

Answer:

The answer is B (transgenic)

Explanation:

What types of user permissions can you set up when adding a new team member in QuickBooks Online Accountant?

Answers

Answer:

1. Standard User

2. Company Admin

3. Reports only

4. Time tracking only

5. Accountant

Explanation:

There are different types of user permissions one can set up when adding a new team member in QuickBooks Online Accountant. This includes the following:

1. Standard User: this can be utilized to specialize user's access right

2. Company Admin: this gives such users additional or access rights in the firm.

3. Reports only: this gives users the rights to reports only.

4. Time tracking only: this only gives users the ability to see the version that has timesheets and time reports

5. Accountant: this is designed for the firm's accountant.

8. Write the examples of freeware and Shareware softwares ?

Answers

Explanation:

People use freeware software because it is available free of cost and it can be distributed free of cost, that is why it is called FREEware.

Freeware software:

Adobe PDF

yahoo messenger

Go.ogle Talk

MSN messenger

People use shareware software because it helps them to know about the product more before buying it and this software is available free of cost.

Shareware software:

Adobe acrobat 8 professional

Winzip

Getright

The question is in the photo

Answers

Answer:

a

the most suitable answer

What is the purpose of a Hyperlink

Can you answer both

Answers

Answer:

Number 16 is A Or B And Number 17 is B I think

Explanation:

What is the name for non-paid active links returned by an Internet search engine in the search results?
O sponsored links
O organic links
O dead links
O relevant links

Answers

Answer: b

Explanation:

What is Microsoft PowerPoint?
Oa presentation program included with Microsoft Office
oa project management program available only in certain versions of Microsoft Office
Oa desktop publishing program included with Microsoft Office
oa collaboration program available only in certain versions of Microsoft Office

Answers

Answer:

ITS THE FIRST ONE :)

Explanation:

ALSO IF ITS NOT THE FIRST ONE GO ON YT!

Is anyone else having an issue with brainly mobile, where they don't let you watch ads? If so, what do you do to fix it?​

Answers

Answer:

no im not

Explanation:

but i sorry that you are

A physical host machine has four quad-core CPUs, 16GB of RAM, 1TB of hard drive space, and two 1Gbps NICs. If we need to create four Windows 2008 servers, what will be the first bottleneck we should upgrade?a. CPUb. RAMc. Hard drived. NIC

Answers

Answer:

B. Ram

Explanation:

A random access memory (RAM) can be defined as the internal hardware memory which allows data to be read and written (changed) in a computer. Basically, a random access memory (RAM) is used for temporarily storing data such as software programs, operating system (OS), machine code and working data (data in current use) so that they are easily and rapidly accessible to the central processing unit (CPU).

Additionally, RAM is a volatile memory because any data stored in it would be lost or erased once the computer is turned off. Thus, it can only retain data while the computer is turned on and as such is considered to be a short-term memory.

There are two (2) main types of random access memory (RAM) and these are;

1. Static Random Access Memory (SRAM).

2. Dynamic Random Access Memory (DRAM).

Given a physical host machine that has four quad-core central processing units (CPUs), 16GB of random access memory (RAM), 1TB of hard drive space, and two 1Gbps network interface cards (NICs). Therefore, if we need to create four Windows 2008 servers, the first bottleneck we should upgrade is the random access memory (RAM) because it is typically the working memory that would be used by the server to store data, so they can be accessed easily and rapidly by the central processing unit (CPU).

Hence, the random access memory (RAM) may be increased from 16GB to 64GB or more depending on the client's requirements.

Designing the right elements for the tasks that the user is attempting to perform is called ________.

Answers

Answer:

Interface design

Explanation:

INTERFACE DESIGN are design that are carried out on either a computer or a mobile phone or other devices that will suit the users by designing the style of the devices and how the device will look like which will inturn enable the user to easily carried out or performed any tasks they are want to perform with easy and without any lapses which is why it is important for INTERFACE DESIGN to be design with the right tools that the user can easily understand in order to access and perform their tasks effectively.

Assume an algorithm takes 5.6 seconds to execute on a single 1.9 GHz processor. 20% of the algorithm is sequential. Assume that there is zero latency and that the remaining code exhibits perfect parallelism. How long (in seconds) should the algorithm take to execute on a parallel machine made of 3 1.9 GHz processors?

Answers

Answer:

2.6 seconds

Explanation:

We first start by calculating the speed up

The formula is given as:

n/1+(n-1)F

We have n = 3 which is the number of processors

F = 20% = percentage of algorithm

When we put values into the formula

3/1+(3-1)0.20

= 3/1+2*0.20

= 3/1+0.4

= 3/1.4

Speed up = 2.14

From here we calculate the expected time

T/speedups

= 5.6/2.14

= 2.6

Therefore the expected time is 2.6 seconds

The National Vulnerability Database (NVD) is responsible for actively performing vulnerability testing for every company's software and hardware infrastructure. Is this statement true or false?A. TrueB. False

Answers

Answer:

False

Explanation:

The answer to this question is false. This is because the NVD doesn't perform such tests on their own. Instead they they rely on third-party vendors, software researchers, etc to get such reports and do the assignment of CVSS scores for softwares

The National Vulnerability Database (NVD) is the United State governments leading resource for software vulnerability


Which heading function is the biggest?
1. h1
2. h2
3. h3

Answers

Answer:

h3

Explanation:

sub to Thicc Panda on YT

The answer for this question is number 1

Select the correct answer from each drop-down menu.
Complete the sentence listing the basic parts of a computer.
All computers have these four basic parts: an input device, a

Answers

Answer:

all computers have an input device, storage, proccesing,and output

hope it helped

Explanation:

What input is needed for the defined output?

Answers

A B C values are 1. The logical AND give 1 when both the inputs are one

Write a program that asks the user for a word. Next, open up the movie reviews.txt file and examine every review one at a time. If a review contains the desired word you should make a note of the review score in an accumulator variable. Finally, produce some output that tells your user how that word was used across all reviews as well as the classification for this word (any score of 2.0 or higher can be considered

Answers

Answer:

import numpy as np

word = input("Enter a word: ")

acc = []

with open("Downloads/record-collection.txt", "r") as file:

   lines = file.readlines()

   for line in lines:

       if word in line:

           line = line.strip()

           acc.append(int(line[0]))

   if np.mean(acc) >= 2:

       print(f"The word {word} is a positive word")

       print(f"{word} appeared {len(acc)} times")

       print(f"the review of the word {word} is {round(np.mean(acc), 2)}")

   else:

       print(f"the word {word} is a negative word with review\

{round(np.mean(acc), 2)}")

Explanation:

The python program gets the text from the review file, using the user input word to get the definition of reviews based on the word, whether positive or negative.

The program uses the 'with' keyword to open the file and created the acc variable to hold the reviews gotten. The mean of the acc is calculated with the numpy mean method and if the mean is equal to or greater than 2 it is a positive word, else negative.

2. The Warren Commission investigated the assassination of President _______________________ in 1964.

Answers

Answer:

President Kennedy

Explanation:

John F. Kennedy was the 35th President of US. He was assassinated in 1963 in Dallas

putting commands in correct order so computers can read the commands

a. debugging
b. sequencing
c. conditionals

Answers

Answer:

its b I think I'm pretty sure

Select the examples that best demonstrate likely tasks for Revenue and Taxation workers. Check all that apply. Brenda works for the IRS reviewing paperwork. Jenny reviews buildings to determine how much money they are worth. Luke administers tests for driver licenses. Vernice negotiates with foreign officials in a U.S. embassy. Kareem advises businesses to make sure they handle their finances correctly. Parker takes notes during city council meetings and creates reports for council members.

Answers

Answer:

Brenda works for the IRS reviewing paperwork.

Jenny reviews buildings to determine how much money they are worth

Kareem advises businesses to make sure they handle their finances correctly.

Explanation:

The best demonstrate likely tasks for Revenue and Taxation workers are:

a. Brenda works for the IRS reviewing paperwork.

b. Jenny reviews buildings to determine how much money they are worth

e. Kareem advises businesses to make sure they handle their finances correctly.

What are Revenue and Taxation?

In practically every nation on the planet, governments impose taxes as mandatory levies on people or things. Taxation is primarily used to generate money for government spending, though it can also be used for other things.

A tax is a mandatory financial charge or another sort of levy that is placed on a taxpayer by a governmental entity in order to pay for public services and other expenses.

Taxes are essential because governments use the money they raise from them to fund social programs. Government investments in the healthcare industry would not be possible without taxes. Health services including social healthcare, medical research, social security, etc. are paid for by taxes.

Therefore, the correct options are a, b, and e.

To learn more about Revenue and Taxation, refer to the link:

https://brainly.com/question/29570932

#SPJ2

Question # 6
Dropdown
Choose the correct ending to the sentence below.


The function localtime() _____________________

Answers

Answer:

returns a different value every time you use it

Explanation: :)

Suppose that a t-shirt comes in five sizes: S, M, L, XL, XXL. Each size comes in four colors. How many possible t-shirts are there?

Answers

Answer:

120

Explanation:

This question is basically asking how many ways can we arrange 5 sizes of shirts if they come in 4 colors.

5 permutation of 4

To find permutation, we use the formula

P(n, r) = n! / (n - r)!

Where

n is the size of the shirts available, 5

r is the color of each shirt available, 4

P(5, 4) = 5! / (5 - 4)!

P(5, 4) = (5 * 4 * 3 * 2 * 1) / 1!

P(5, 4) = 120 / 1

P(5, 4) = 120

Therefore, the total number of shirts available is 120

If a computer reboots itself on its own, the computer might have a(n) access problem. hardware problem. Internet problem. software problem.

Answers

Answer:

D) Software problem

Explanation:

plz give me brainliest

D

edge2021      YWWWWWWWWWWWWWWWWWWWWW                                  

Select the qualification that is best demonstrated in each example. Trinity recommends investment strategies to customers. Larissa is careful to recommend that customers only buy products that will truly help them, not just products that will make her the most money. Eli listens and pays close attention to a customer who is explaining her financial situation. Joaquin sends an e-mail to a customer asking for more information about a budget

Answers

Answer:

1:decision making skills 2:integrity 3:communication 4:computer skill

Explanation:

got it right on edg 2020

pov: Your behind on classes

Answer:

1. decisions making

2. integrity

3. communication skills

4. computer skills

If an object someThing has a method someMethod( ), then you can call the method using the statement ____________ .
a. someMethod(someThing);
b. someThing.someMethod( );
c. someMethod.someThing() ;
d. someThing = someMethod( );

Answers

Answer:

C) someThing.someMethod( )

Explanation:

The methods in a class can be accessed outside the class (assuming they are public methods and not private to the class) by using the dot(.) symbol and calling the method on the instance or object of the class.

In this case, the object of the class someThing, calls the method, someMethod( ) by using a dot and the name of the method with a parentheses at the end. This enables the code in the method act on the class instance or object.

Which Cisco IOS command will permit the engineer to modify the current configuration of the switch while it is powered on?

Answers

Configure terminal because Commands in this mode are written to the running configuration file as soon as you enter them (using the Enter key/Carriage Return). After you enter the configure terminal command, the system prompt changes from switch# to switch(config)#, indicating that the switch is in configuration mode.

how many jobs can you get without a college degree

Answers

The 10 highest-paying jobs you can get without a college degree all pay more than $79,000 those are Commercial pilots.
Detectives and criminal investigators. ...
Powerhouse, substation, and relay electrical and electronics repairers. ...
Elevator installers and repairers. ...
Power plant operators. ...
Media and communication equipment workers. ...
mhmmmmmmmm said he wanted a new one for the first time in the first one time i and the other ones were on delivered to him and

What is the output?

class car:
model = "
age = 20
myCar = car()
myCar.age= myCar.age + 10
print(myCar.age)

Output: ​

Answers

Answer:

The answer to this question is 30

The explanation is given below

You can also see the attachment section to see the image of result

Explanation:

This question want use to print the value of myCar.age

print(myCar.age)

If we look at line 3, age=20

So the previous value is 20 and we have to add 10 to add as shown

myCar.age= myCar.age + 10

The value will become 30

Answer:

30

Explanation:

trust

Which of the following are downlink transport channels?
a. BCH.
b. PCH.
C. RACH.
d. UL-SCH.
e. DL-SCH.

Answers

I think it’s a or b

Columns, margins and orientation can all be found on what tab

Answers

Answer:

The right answer is: Option C: Layout.

Explanation:

Columns are used to write text in a word document in more than one columns. Similarly, margins is the empty space that is left blank from all sides of the page. Orientation can be either landscape or portrait.

all these options are found in the Layout tab in MS word.

Hence,

The right answer is: Option C: Layout.

Other Questions
15. Yo __ dinero y la cuenta al cliente. (dar) *16. Ellos __ su orden al mesero.( dar)17. Nosotros __ el men. (leer)18. Mi familia __ la tele cuando comen. (ver) find the surface area of the cereal box of 30x20x5 Which number is the closest approximation to the value of [tex]\sqrt{83}[/tex]?A) 9.1B) 9.2C) 41.5D) 41.6 Eve is organizing a race to raise money for a local children's hospital. She makes $20 for each 5K participant and $45 for each 10K participant. Her goal is to raise $9,500. If x represents the number of participants in the 5K race and y represents the number of participants in the 10K race, the linear equation for the given scenario is ______________. If Eve raises exactly $9,500, is it possible for there to be 220 participants in the 5K race? (yes or no) Find the area of a circle with a circumference of \blueD{18.84}18.84start color #11accd, 18, point, 84, end color #11accd units. HELPPPPPPPPPWhich expression represents the area of the rectangle Can somebody just give me 2 sentences on why Christmas trees are the best lol? The probability that a student passes the AP Stats exam is 0.57. The probability that a student passes the APCalculus exam is 0.43. The probability that a student passes the AP Stats exam given they passed the AP Calculusexam is 0.85. Find the probability that a student passes both exams.O 0.3655O 0.4845O 0.7544O 1.3256 Amir has researched the effects of screen time onadolescents. Now, Amir is writing a response. Amirdoes not think that screen time is something all teenscan avoidWhich detail from the source best supports Amir'sidea?While many schools have brought in 1:1 programs, whichprovide one device for every student, experts recommendthat teens and tweens limit their screen time and use oftechnology.Screen time can have positive effects and can be used forlearning, but it can also be negative and toxic to teens. Athome, teens use screen time to connect with others,watch videos, and play games, but also to engage in socialmedia banter and sharing. At school, students may watcheducational videos that connect to a lesson.Either way, teens are getting more screen time than everbefore. Both parents and teachers need to set limits. Justbecause the technology is available does not mean it isalways helpful, experts say.Teachers who wanted technology in their classrooms arenow finding it to be a distraction, as students use devicesfor noneducational purposes.* "Teens are getting more screen time than everbefore."O "Parents and guardians may be able to adjustscreen time at home, but not every place will allowfor those limits."O "Technology-free schools do exist."O "Screen time can have positive effects and can beused for learning, but it can also be negative andtoxic to teens." PLSSS HELP IM CRYINGGGGGGg WILL GIVE BRAINLIESTThe National Road was ______ miles long when completed Help asap if you want brainliest. And no fake answers. where does the last one go??? WHAT DOES DENSITY HAVE TO DO WITH PLATE TECTONICS?Explain Which statement best describes the difference between the Greek and Roman ways of depicting people through their art? Let f(x) = 2x 6 . Solve y = f(x) for x. How is the media most influential during elections?A.convincing Americans who to vote forB.choosing what issues and candidates are most deserving of coverageC.providing equal coverage to each candidate running for officeD.conducting polls to determine who the winner is on election day I would appreciate it if a person could answer this question HURRY !! Please The answer choices are A- 2 pi mB- 360 pi mC- 12 pi mD- 2 pi m How is the relationship of imagery and psychoanalysis related manifested in art psychotherapy?