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
Katyanochek1 [597]
2 years ago
12

1 #include 2 3 int max2(int x, int y) { 4 int result = y; 5 if (x > y) { 6 result = x; 7 } 8 return result; 9 } 10 11 int max

3(int x, int y, int z) { 12 return max2(max2(x,y),z); 13 } 14 15 int main() { 16 int a = 5, b = 7, c = 3; 17 18 printf("%d\n",max3(a, b, c)); 19 20 printf("\n\n"); 21 return 0; 22 } What number is printed when the program is run?
Computers and Technology
1 answer:
Serhud [2]2 years ago
6 0

Answer:

7

Explanation:

#include <stdio.h>

int max2(int x, int y) {

   int result = y;

   if (x > y) {

       result = x;

   }

   return result;

}

int max3(int x, int y, int z) {

   return max2(max2(x,y),z);

}

int main() {

   int a = 5, b = 7, c = 3;

   printf("%d",max3(a, b, c));

   printf("");

   return 0;

}

Hi, first of all, next time you post the question, it would be nice to copy and paste like above. This will help us to read the code easily. Thanks for your cooperation.

We start from the main function:

The variables are initialized → a = 5, b = 7, c = 3

max3 function is called with previous variables and the result is printed → printf("%d",max3(a, b, c));

We go to the max3 function:

It takes 3 integers as parameters and returns the result of → max2(max2(x,y),z)

Note that max2 function is called two times here (One call is in another call actually. That is why we need to first evaluate the inner one and use the result of that as first parameter for the outer call)

We go to the max2 function:

It takes 2 integers as parameters. If the first one is greater than the second one, it returns first one. Otherwise, it returns the second one.

First we deal with the inner call. max2(x,y) is max2(5,7) and the it returns 7.

Now, we need to take care the outer call max2(7, z) is max2(7, 3) and it returns 7 again.

Thus, the program prints 7.

You might be interested in
Which key should you press to leave the cell as it originally was?
GREYUIT [131]
The correct answer should be A. Delete
4 0
3 years ago
What is a data broker?
AleksAgata [21]

Answer:

The correct option is a.

A business that collects personal information about consumers and sells that information to other organizations.

Explanation:

Data brokers, also known as data suppliers, data fetchers, information brokers, or even data providers are businesses or companies (even individuals) that, on the most basic level, source and aggregate data and information (mostly information that are meant to be confidential or that are in the real sense difficult to get) and then resell them to third parties. These third parties could be other data brokers.  

They collect data and information from a wide range of resources and sources - offline and/or online e.g web access history, bank details, credit card information, official records (such as birth and marriage certificates, driver's licenses).  

Brokers can steal round about any information. Examples of information that brokers legally or illegally steal are full name, residential address, marital status, age, gender, national identification number, bank verification number. Brokers and hackers are siblings.

A couple types of data brokers are:

1. Those for fraud detection

2. Those for risk mitigation  

Hope this helps!

6 0
3 years ago
What is software piracy
Tju [1.3M]
Software piracy is the illegal copying, distribution, or use of software.
8 0
3 years ago
Read 2 more answers
Nearly all social software systems include a(n) ________, which helps control your information flow.
Alekssandra [29.7K]

Answer:

dashboard

Explanation:

4 0
2 years ago
Read 2 more answers
Gaming related
Blababa [14]

Answer:

yes affects your K/D

Explanation:

winner winner chicken dinner

please mark me please brainliest or mark thanks

5 0
2 years ago
Other questions:
  • Ascending and descending are examples of
    5·2 answers
  • 안녕하세요! 한국어도 여기서 사용 가능한지 궁금합니다.
    6·2 answers
  • What type of analysis should be used to respond to the statement, "Let's cut advertising by $1000 repeatedly so we can see its r
    14·1 answer
  • Rachel wants to post content from digital cameras on the web. Which online tool will help Rachel to post and edit content on a w
    5·1 answer
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • which of the following is a component of a rope-rewind starter system? a. a recoil spring c. an air vane governor b. a wrist pin
    5·1 answer
  • How do you change your age on Brainly?
    10·1 answer
  • PYTHON Write a grade program using a function called computegrade that takes a score as its parameter and return a grade as a st
    8·1 answer
  • A human subject’s photographs show two catchlights in each eye that are unwanted by the photographer. What is the most likely ca
    12·1 answer
  • Los organos de los sentidos perciben de la misma manera un estimulo?porque?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!