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
adoni [48]
4 years ago
6

For the function definition int SomeFunc( /* in */ int alpha, /* in */ int beta ) { int gamma; alpha = alpha + beta; gamma = 2 *

alpha; return gamma; } what is the function postcondition?
Computers and Technology
2 answers:
Sonbull [250]4 years ago
3 0

Answer:

A function post-condition refers to what will happen  and return after calling the function.

Given the function definition as follows:

  1. int SomeFunc( /* in */ int alpha, /* in */ int beta )
  2. {
  3.    int gamma;
  4.    alpha = alpha + beta;
  5.    gamma = 2 * alpha;
  6.    return gamma;
  7. }

If we call the function by passing two values, 3 and 4, as input parameters, the 3 will be captured by alpha and 4 by beta. The two input values will by calculated based on the formula defined inside the function as follows:

alpha = 3 + 4 = 7

gamma = 2 * 7 = 14

At last the function will return 14.

lbvjy [14]4 years ago
3 0

Answer:

function value == 2*([email protected] + [email protected])

Explanation:

int SomeFunc( /*in */ int alpha,  /* in */ int beta )

{

int gamma;

alpha = alpha + beta;

gamma = 2 * alpha;

return gamma;

}

The post-condition is useful for testing purposes. It represents what value the function SomFunc is expected to return at the time of program execution in a simplified manner.

For the given problem the post-condition is

function value == 2*([email protected] + [email protected])

Where @entry represents the value of alpha and beta at the moment when the function was called.

Note:  /*in */  it represents comment in c++ language and is ignored by the compiler

You might be interested in
Please conduct some research and find an article on Security Threats and please provide link of the article.
finlep [7]

Answer:

There are Security Threats happening every other day in the world. Some are minor while others can catastrophic.

Explanation:

There are also many types of <u>Security Threats</u>, <u>Breaches</u>, and <u>Hacks</u> in the world of IT. Each with their own Security Measures. Below are two links about this topic. The first link is an article about 5 of the worst corporate Security Breaches/Hacks to have taken place. While the second link is an article about the Top 10 Network Security Threats.

https://abcnews.go.com/Technology/marriotts-data-breach-large-largest-worst-corporate-hacks/story?id=59520391

https://securitytrails.com/blog/top-10-common-network-security-threats-explained

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
The house belives that works should be compensated for the loss of jobs due to automation? Describe it in against motion of the
Dima020 [189]

well they should because without a job people cant live a good life and if they took that from them then they should compensate them at least.

5 0
3 years ago
analyze the ethical issues in the use of information technology in Multinational company (MNC) and support you answer with one e
LekaFEV [45]

Answer:

Explanation:

Multinational Companies tend to have millions of users from all over the globe who use their services and in doing so provide their information. This information gets saved on the databases of these companies. It is then up to the company on how they will use this information. This is where ethicality comes into play. A company can act ethically and protect the information that has been entrusted to them by their user, or they can act unethically and use the users' personal data to make profits. It has recently come to light that some companies have been using users' private data and would sell it to other companies for profit. These buying companies would then use the data for a variety of things such as ad targeting and statistics. These companies profited massively and the actual owners of the data did not, which makes this incredibly unethical.

8 0
3 years ago
Two or more computers that are linked together are called which of the following
bekas [8.4K]
I’m pretty sure it’s a network hope this helps
8 0
3 years ago
Drag each tile to the correct box.
garri49 [273]
I think select the video insert select the movie option under illustrations resize the video player then select the insert tab i’m not 100 percent sure tho
8 0
3 years ago
Read 2 more answers
Other questions:
  • What is called photo and video edition?
    8·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • Programmers insert documentation called facts into the program code.? <br> a. True <br> b. False
    9·1 answer
  • Which statement about images is correct? A) A virtual image cannot be formed on a screen. B) A virtual image cannot be viewed by
    12·1 answer
  • Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
    12·1 answer
  • Solve the following quadratic equation <br><br>y=6x^2-12x+1
    9·1 answer
  • EDVAC stands for? on which theory it is made on?
    15·1 answer
  • Which of the following data structures can erase from its beginning or its end in O(1) time?
    15·1 answer
  • Select the correct answer
    15·1 answer
  • A. In I/O interation between OS and devices, describe how hybrid mechanism works?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!