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
Differences between barcode reader and character recognition devices​
spin [16.1K]

<u><em>Differences between barcode reader and character recognition devices​:</em></u>

Barcode Reader or Barcode Scanner:  

  • Barcode Scanner scans the data by brightening the barcodes usingSensor
  • The analog signal is then converted into digital signal by Converter.
  • The Decoder calculates the converted data and sends valid data to the computer.  

Character Recognition Devices (OCR):

  • OCR scans the physical document and converts them into two-coloured format.
  • The darker and lighter area are identified as characters and blanks respectively.
  • The common methods used are: Pattern Recognition and Feature Detection.

3 0
3 years ago
Read 2 more answers
Implement the simulation of a biased 6-sided die which takes the values 1,2,3,4,5,6 with probabilities 1/8,1/12,1/8,1/12,1/12,1/
hjlf

Answer:

see explaination

Explanation:

import numpy as np

import matplotlib.pyplot as plt

a = [1, 2, 3, 4, 5, 6]

prob = [1.0/8.0, 1.0/12.0, 1.0/8.0, 1.0/12.0, 1.0/12.0, 1.0/2.0]

smls = 1000000

rolls = list(np.random.choice(a, smls, p=prob))

counts = [rolls.count(i) for i in a]

prob_exper = [float(counts[i])/1000000.0 for i in range(6)]

print("\nProbabilities from experiment : \n\n", prob_exper, end = "\n\n")

plt.hist(rolls)

plt.title("Histogram with counts")

plt.show()

check attachment output and histogram

4 0
3 years ago
Explain briefly why the discovery phase is a favorite with many developers
Mamont248 [21]

Answer:

Discovery phase is the beginning step of a system development work. It is an important step for our professional staff, as people will need the information gathered to make informed technical advice for the construction effort and to provide an exact cost assessment.

Explanation:

Discovery regulates our organization with the customer’s requirements at the origin. The exercises and deliverables of outline Discovery are essential to the correctness of design evaluation and preparation, and we suggest that they always are completed for complicated custom requests with unknown and unsteady technical elements.

3 0
3 years ago
In the Northern Hemisphere, large south-facing windows receive more total sunlight during the day and would be a part of a ___ s
9966 [12]

Answer:

Passive solar heating system

Explanation:

The goal of passive solar heating systems usually refers to the system in which the energy provided by the sun is used for heating and cooling of the living places in a house.

When sunlight falls on the house, the building elements capture the heat energy of the sun and it later releases back this heat when the sun is not there. The main objective of this system is to regulate the room temperature. It is comprised of two main elements, one is the glasses that face towards the south and a thermal mass that is used for heat absorption, storing and distribution of heat.

6 0
3 years ago
The EDI ____________layer describes the business application that i
suter [353]

Answer:

a) EDI Semantic Layer

Explanation:

EDI is an acronym for electronic data interchange and it can be defined as a form of communication between interconnected computer systems and software applications with respect to business informations in standard digital formats.

This ultimately implies that, electronic data interchange (EDI) involves the transfer of business informations such as financial transactions between the computer systems of various organizations such as banks, companies, governmental agencies, etc. Thus, it avails businesses the ability to create strategic communications using computer to computer links to effectively and efficiently exchange business informations electronically or in digital formats.

Hence, the EDI Semantic layer describes the business application that is driving electronic data interchange (EDI).

6 0
2 years ago
Other questions:
  • What operating system was most commonly used by early personal computers? Apple Mac MS-DOS Windows
    6·2 answers
  • _____ is when network managers deal with network breakdowns and immediate problems instead of performing tasks according to a we
    9·1 answer
  • 22. A user receives an error message when logging into Salesforce. What is the first check performed by an administrator?
    8·1 answer
  • A ________ -tier design includes a middle layer between the client and server that processes the client requests and translates
    11·1 answer
  • True or false? Main Content (MC) may include links on the page.
    6·1 answer
  • Which Supreme Court case resulted in a decree issued for the Michigan Department of Corrections to provide female inmates access
    10·1 answer
  • Suppose barriers to entry exist in the telecommunications industry. This best describes a _____ market.
    12·1 answer
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • A group of users in a small publishing office want to share large image files in a common folder with high availability. Which o
    15·1 answer
  • What is software?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!