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
masya89 [10]
3 years ago
15

Write a program that uses a function called Output_Array_Info. Output_Array_Info Properties: Input Parameters: 1. A pointer to a

n integer called array_ptr. This will be used to point to an array of integers. 2. An integer that stores the size of the array.
Engineering
1 answer:
Artyom0805 [142]3 years ago
8 0

Answer:

C++ code explained below

Explanation:

Please note the below program has been tested on ubuntu 16.04 system and compiled using g++ compiler. This code will also work on other IDE's

-----------------------------------------------------------------------------------------------------------------------------------

Program:

-----------------------------------------------------------------------------------------------------------------------------------

//header files

#include<iostream>

//namespace

using namespace std;

//function defintion

void Output_Array_Info(int *array_ptr, int size)

{

//display all array elements

cout<<"Array elements are: "<<endl;

for(int i =0; i<size; i++)

{

cout<<*(array_ptr+i)<<endl;

}

//display address of each element

cout<<endl<<"memory address of each array elemnt is: "<<endl;

for(int i =0; i<size; i++)

{

cout<<array_ptr+i<<endl;

}

}

//start of main function

int main()

{

//pointer variables

int *pointer;

//an array

int numbers[] = { 5, 7, 9, 10, 12};

//pointer pointing to array

pointer = numbers;

//calculate the size of the array

int size = sizeof(numbers)/sizeof(int);

//call to function

Output_Array_Info(numbers, size);

return 0;

}

//end of the main program

You might be interested in
What is the ANSI B paper size also know as?
krek1111 [17]

Answer:

ANSI A sized paper is commonly referred to as Letter and ANSI B as Ledger or Tabloid.

Explanation:

7 0
3 years ago
A liquid stream containing 52.0 mole% benzene and the balance toluene at 20.0°C is fed to a continuous single-stage evaporator a
OLga [1]

Answer:

Operating Pressure P = 793.716 mmHg

Y_Benzene y1 = 0.541

Explanation:

Given that;

liquid phase leaving the evaporator = 32.5 mole%

Equi Temp T = 99.0°C = 99 + 273.15 = 372.15 K

Now let 1 and 2 represent Benzene and Toluene respectively.

Antoine's Constant for these components are;

COMPONENETS        A                B                    C

Benzene 1             4.72583     1660.652        -1.461

Toluene  2            4.07827     1343.943         -53.773

Antoine's equation is expressed as;

Ps = 10^(A - (B/(T+C)))

Ps is in Bar and T is in Kelvin

so

P1s = 10^( 4.72583 - (1660.652/(372.15 - (-1.461)))) = 1.7617 Bar

P2s = 10^( 4.07827 - (1343.943/(372.15 - (-53.773)))) = 0.7195 Bar

now here, liquid leaving and vapor are both in equilibrium

composition of liquid leaving are;

X1 = 32.5%    = 0.325

X2 = 1 - X1 = 1 - 0.325 = 0.675

Now

Raoult's Law is expressed as;

p × y1=x1 × pis     for all components

So for Benzene ; p × y1=x1 × p1s   ------let this be equation 1

for Toluene ; p × y2=x2 × p2s   ------let this be equation 2

lets add equ 1 and 2

p × y1=x1 × p1s + p × y2=x2 × p2s

p(y1 + y2) = x1 × p1s + x2 × p2s

buy y1 + y2 = 1

therefore we substitute

p(1) = 0.325 × 1.7617 + 0.675 × 0.7195 = 1.0582 Bar

we know that 1 Bar = 750.062 mmHg

so p = 1.0582 × 750.062

p = 793.716 mmHg

Also from equation 1

p × y1=x1 × p1s

y1 = (x1 × p1s) / p

y1 = (0.325 × 1.7617) / 1.0582

y1 = 0.541

Therefore;

Operating Pressure P = 793.716 mmHg

Y_Benzene y1 = 0.541

5 0
3 years ago
Is it possible to pass in a course if I passed in its prerequisites without understanding most about them?​
MAXImum [283]

Answer:

I don't think so but you could  remember  little bit and  you could pass.

Explanation:

4 0
2 years ago
In a pipe of diameter 350mm and length 75mm, water is flowing at a velocity of 2.8m/s. If the Kinematic viscosity of water is 0.
kodGreya [7K]

Explanation:

the answer is in picture

5 0
3 years ago
A basketball has a 300-mm outer diameter and a 3-mm wall thickness. Determine the normal stress in the wall when the basketball
faltersainse [42]

Answer:

2.65 MPa

Explanation:

To find the normal stress (σ) in the wall of the basketball we need to use the following equation:

\sigma = \frac{p*r}{2t}

<u>Where:</u>

p: is the gage pressure = 108 kPa

r: is the inner radius of the ball

t: is the thickness = 3 mm  

Hence, we need to find r, as follows:

r_{inner} = r_{outer} - t    

r_{inner} = \frac{d}{2} - t

<u>Where:</u>

d: is the outer diameter = 300 mm

r_{inner} = \frac{300 mm}{2} - 3 mm = 147 mm

Now, we can find the normal stress (σ) in the wall of the basketball:

\sigma = \frac{p*r}{2t} = \frac{108 kPa*147 mm}{2*3 mm} = 2646 kPa = 2.65 MPa

Therefore, the normal stress is 2.65 MPa.

I hope it helps you!

3 0
3 years ago
Other questions:
  • Water flows at a rate of 10 gallons per minute in a new horizontal 0.75?in. diameter galvanized iron pipe. Determine the pressur
    8·1 answer
  • A long bone is subjected to a torsion test. Assume that the inner diameter is 0.375 in. and the outer diameter is 1.25 in., both
    14·1 answer
  • How long should the shafts remain in the furnace to achieve a desired centerline temperature of 800K? 2) Determine the temperatu
    5·1 answer
  • 2 Blocks 1 and 2 rest on rough surfaces with coefficient of frictions ¢1 and ¢2 respectively. The blocks
    12·1 answer
  • Ma puteti ajuta cu un argument de 2 pagini despre inlocuirea garniturii de etansare de pe pistonul etrierului de franare la un a
    10·1 answer
  • A person is interested in becoming an electrician. What are some appropriate types of preparation that this individual can consi
    7·2 answers
  • Employees cannot be held legally responsible for an environmental violation.
    14·1 answer
  •  what can be done to prevent bridges from collapsing? ( give at least two examples)
    7·1 answer
  • Why is communication one of the most important aspects of an engineer's job?
    12·1 answer
  • Consider the function f(n) = n
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!