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
How much does 5 acres of land cost in the US?
Dvinal [7]

Answer:

Larson, an economist, who placed the total value of $23 trillion for the entire 1.9 billion acres of land in the United States. This means that the average cost for an acre of land is $12,000 or $60,000 for 5 acres of land. Almost half of the land in the US is used for agricultural purposes.

Explanation:

6 0
3 years ago
When you multiply monomials with the same variables, you multiply the coefficients and add the exponents!
RideAnS [48]

Answer: ok

Explanation:

this isn't a question?

3 0
2 years ago
What mass of LP gas is necessary to heat 1.4 L of water from room temperature (25.0 ∘C) to boiling (100.0 ∘C)? Assume that durin
DochEvi [55]

Answer:

m_{LP}=0.45\,kg

Explanation:

Let assume that heating and boiling process occurs under an athmospheric pressure of 101.325 kPa. The heat needed to boil water is:

Q_{water} = (1.4\,L)\cdot(\frac{1\,m^{3}}{1000\,L} )\cdot (1000\,\frac{kg}{m^{3}} )\cdot [(4.187\,\frac{kJ}{kg\cdot ^{\textdegree}C} )\cdot (100^{\textdegree}C-25^{\textdegree}C)+2257\,\frac{kJ}{kg}]

Q_{water} = 3599.435\,kJ

The heat liberated by the LP gas is:

Q_{LP} = \frac{3599.435\,kJ}{0.16}

Q_{LP} = 22496.469\,kJ

A kilogram of LP gas has a minimum combustion power of 50028\,kJ. Then, the required mass is:  

m_{LP} = \frac{22496.469\,kJ}{50028\,\frac{kJ}{kg} }

m_{LP}=0.45\,kg

6 0
3 years ago
What type of engineering do you think would help solve this SDG???
OleMash [197]

Answer:

Explanation:

Planning engineering

4 0
2 years ago
A 50 Hz, four pole turbo-generator rated 100 MVA, 11 kV has an inertia constant of 8.0 MJ/MVA. (a) Find the stored energy in the
raketka [301]

Given Information:

Frequency = f = 60 Hz

Complex rated power = G = 100 MVA

Intertia constant = H = 8 MJ/MVA

Mechanical power = Pmech = 80 MW

Electrical power = Pelec = 50 MW

Number of poles = P = 4

No. of cycles = 10

Required Information:

(a) stored energy = ?

(b) rotor acceleration = ?

(c) change in torque angle = ?

(c) rotor speed = ?

Answer:

(a) stored energy = 800 Mj

(b) rotor acceleration = 337.46 elec deg/s²

(c) change in torque angle (in elec deg) = 6.75 elec deg

(c) change in torque angle (in rmp/s) = 28.12 rpm/s

(c) rotor speed = 1505.62 rpm

Explanation:

(a) Find the stored energy in the rotor at synchronous speed.

The stored energy is given by

E = G \times H

Where G represents complex rated power and H is the inertia constant of turbo-generator.

E = 100 \times 8 \\\\E = 800 \: MJ

(b) If the mechanical input is suddenly raised to 80 MW for an electrical load of 50 MW, find rotor acceleration, neglecting mechanical and electrical losses.

The rotor acceleration is given by

$ P_a = P_{mech} - P_{elec} = M \frac{d^2 \delta}{dt^2}  $

Where M is given by

$ M = \frac{E}{180 \times f} $

$ M = \frac{800}{180 \times 50} $

M = 0.0889 \: MJ \cdot s/ elec \: \: deg

So, the rotor acceleration is

$ P_a = 80 - 50 = 0.0889 \frac{d^2 \delta}{dt^2}  $

$  30 = 0.0889 \frac{d^2 \delta}{dt^2}  $

$   \frac{d^2 \delta}{dt^2} = \frac{30}{0.0889}  $

$   \frac{d^2 \delta}{dt^2} = 337.46 \:\: elec \: deg/s^2 $

(c) If the acceleration calculated in part(b) is maintained for 10 cycles, find the change in torque angle and rotor speed in revolutions per minute at the end of this period.

The change in torque angle is given by

$ \Delta  \delta = \frac{1}{2} \cdot \frac{d^2 \delta}{dt^2}\cdot (t)^2 $

Where t is given by

1 \: cycle = 1/f = 1/50 \\\\10 \: cycles = 10/50 = 0.2  \\\\t = 0.2 \: sec

So,

$ \Delta  \delta = \frac{1}{2} \cdot 337.46 \cdot (0.2)^2 $

$ \Delta  \delta = 6.75 \: elec \: deg

The change in torque in rpm/s is given by

$ \Delta  \delta = \frac{337.46 \cdot 60}{2 \cdot 360\circ  }   $

$ \Delta  \delta =28.12 \: \: rpm/s $

The rotor speed in revolutions per minute at the end of this period (10 cycles) is given by

$ Rotor \: speed = \frac{120 \cdot f}{P}  + (\Delta  \delta)\cdot t  $

Where P is the number of poles of the turbo-generator.

$ Rotor \: speed = \frac{120 \cdot 50}{4}  + (28.12)\cdot 0.2  $

$ Rotor \: speed = 1500  + 5.62  $

$ Rotor \: speed = 1505.62 \:\: rpm

4 0
3 years ago
Other questions:
  • The arm of the robot is extending at a constant rate = 1.5 ft/s when r = 3 ft, z = (4t2) ft, and  = (1.5 t) rad, where t is in
    14·1 answer
  • 1. What is an op-amp? List the characteristics of an ideal op-amp
    11·1 answer
  • Assume the following LTI system where the input signal is an impulse train (i.e.,x(t)=∑????(t−nT0)[infinity]n=−[infinity].a)Find
    10·1 answer
  • A transmitter has an output power of 0.1mW while the fiber has coupling loss of 12dB, attenuation of
    11·1 answer
  • Technician A says if the input signal turn-on time is too fast for the input circuit, your program may operate as though the inp
    11·1 answer
  • 11. Which of the following is the brake fluid most often used?
    11·2 answers
  • What does it mean to test a hypothesis?
    13·1 answer
  • Can somebody help me with that
    13·1 answer
  • 8. If you push a 2000 N weight up a ramp with 400 N of force and you raise the weight 1 meter,
    9·1 answer
  • The condition where all forces acting on an object are balanced is called
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!