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]
3 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]3 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]3 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
How should font appear in a slide presentation compared to the font in a document
saul85 [17]

Answer:

larger in a presentation, smaller on a document.

Explanation:

this makes it easier to tell which is which.

3 0
3 years ago
What can you do to stop a computer from repeatedly restarting in a continuous loop?
abruzzese [7]
There are ways to break into the boot cycle of every machine, you could use one of them. Hold down modifier key[s] so that it boots differently or you may get a menu to select boot options.

A specific answer is OS/firmware dependent.
4 0
3 years ago
Hot components or sharp edges of computer is an example of what hazard​
Alexxandr [17]

Answer:

hot components or sharp edges of computer is an example of a mechanical hazard

6 0
3 years ago
Write a recursive function called digit_count() that takes a positive integer as a parameter and returns the number of digits in
Gelneren [198K]

Using the computational knowledge in python it is possible to write a code that Write a recursive function called digit_count()

<h3>What is a function in Python?</h3>

In Python, a function is a sequence of commands that performs some task and that has a name. Its main purpose is to help us organize programs into chunks that correspond to how we envision a solution to the problem.

<h3>Writting the code in python:</h3>

<em>def countDigits(n):</em>

<em>   if n< 10:</em>

<em>      return 1</em>

<em>   else:</em>

<em>       return 1 + countDigits(n / 10)</em>

See more about python at brainly.com/question/13437928

#SPJ1

8 0
2 years ago
Generally considered to be the most important information security policies, what item below defines the actions a user may perf
tamaranim1 [39]

Answer:

A. Acceptable use policies

Explanation:

These specific actions that the user may perform are all described in the acceptable use policy. The company usually requires that the user read and sign this policy before being granted a network ID into the system itself. By signing this agreement the individual user agrees to perform ONLY the actions listed in the agreement and nothing else and are restricted from unauthorized areas.

3 0
3 years ago
Other questions:
  • Chdtp aoxophg gr72 ae9&gt;3 zqqz
    12·1 answer
  • A sense of scale tells us what about the objects in a picture?
    11·2 answers
  • In one to two sentences, explain why citizens pay taxes
    8·1 answer
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • Which ofthe following sentence beginnings would be best to use in apersuasive request?
    8·1 answer
  • Cnt115-02* which of the following is a private ip address and can't be routed across the internet?
    12·1 answer
  • "What is the capital of Belarus?" is an example of what type of search query
    10·2 answers
  • Which of the following are acceptable to share? Check all of the boxes that apply.
    13·1 answer
  • Identify the correct answer in each item. Write your answer on the blank provided before
    13·1 answer
  • What two functions does tcp/ip perform?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!