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
The following program draws squares recursively. Fill in the missing code. import javax.swing\.\*; import java.awt\.\*; public c
ExtremeBDS [4]

Answer:

The missing code to this question is g.

Explanation:

In this question firstly import packages. Then declaration of the class Test that inherits the JApplet. In this class, we declare the default constructor. In this constructor, we call the add function. Then we declare another class that is SquarePanel. This class inherits JPanel. In this class, we define a method that is paintComponent(). In this method, we define an integer variable. In this method, we perform calculations and pass it to another function that is displaySquares(). In this function, we pass the value as the arguments. So in question the missing code or argument is g.

8 0
3 years ago
I want to be a astrophysicist but my parents want me to be a software engineer. whuch one is better?
Andreas93 [3]
You need to discover yourself which one you love to do. Software Engineering is just science and math, programming languages and too much work, but it’s the job of this era. It’s very very desirable and one of the highest salaries in US.
7 0
3 years ago
Need A girl to play wit I'm bored On xbox btw or just to talk too btw be at least 12​
attashe74 [19]

Answer:

im 13 and im a girl wassup

Explanation:

3 0
3 years ago
Read 2 more answers
Different Betweens in SRAM and DRAM !
den301095 [7]

Answer:

Explanation:

<u>Application Differences:</u>

<u>SRAM</u>

SRAM stands for Static Random Access Memory  DRAM stands for Dynamic Random Access Memory

Faster access is due to the usage of transistors to store single bit of data  

SRAMs are used for cache memories due to faster access time  

<u>DRAM</u>

DRAM stands for Dynamic Random Access Memory

DRAMs are used for main memories due to comparatively slower access time.

DRAMs use capacitor to store bits where each capacitor holds a single bit

<u>Parameter differences</u>  

<u>Speed:</u> SRAMs are faster due to presence of transistors. DRAMs are slower due to presence of capacitors

<u>Size:</u> Due to complexity involved in the internal circuits, SRAMs are smaller in capacity for same size of the chip. DRAMs are larger as compared to SRAMs since their capacity for a given physical size is more.

<u>Cost:</u> SRAMs are costlier and the per bit storage cost is more than that of the DRAMs. DRAMs are cheaper and the per bit storage cost is less than that of the SRAMs

5 0
2 years ago
Read 2 more answers
When you assign a value of one data type to a variable of another data type, Visual Basic attempts to perform ________ type conv
sweet [91]

Answer: implicit

Explanation:

When a value of one data type is assigned to a variable of another data type, then Visual Basic attempts to perform an implicit type conversion.

Implicit type conversion, simply refers to when one data type is converted automatically by Python to another data type. It should be noted that no user involvement is needed.

6 0
2 years ago
Other questions:
  • 3. Megan and her brother Marco have a side business where they shop at flea markets, garage sales, and estate
    9·1 answer
  • Which of the following is a justification for giving a Page Quality (PQ) rating of Lowest? Select all that apply. True False The
    7·1 answer
  • A custom date format set for a date/time field that contains the symbols mmm/dd/yy would display the date as ____.
    12·1 answer
  • To read visual and audio text means
    11·1 answer
  • One horsepower is equal to how many foot-pounds of work per second?
    10·2 answers
  • Who wants to give free points to me?
    6·2 answers
  • Two machines can finish a job in StartFraction 20 Over 9 EndFraction hours. Working​ alone, one machine would take one hour long
    10·1 answer
  • I need subscribers plz ​
    15·2 answers
  • What is an operating system that controls some aspects of the computer?
    10·2 answers
  • Internal exception java.net.socketexception connection reset 1.18
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!