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
Computers work with only two states: zero and one (e.g. short , tall)and is known as binary however in fuzzy logic there are ran
Ymorist [56]

Answer:

1) a)True

   b) False

2) False

2. True

4. True

5. True

Explanation:

1.a)Computers work with only two states: zero and one which is true, the language is in 1 and 0 which is called binary

b)in fuzzy logic there are range of states such as short, little tall, very tall etc...

That is false because Fuzzy logic contains also ones and zeros (Binary).

2)2. This is false because by combining the three colors we will get only

256*256*256 color and we don't get billions of colors

eg:R G B

255 0 0 -->one color

220 0 200---> one color

Due to the difficult economic times, increased global competition, demand for customization, and increased consumer sophistication, many companies have increased their investment in hiring many employees, and outsource & off shore middle managers True or False

yes this may be True because By increased global competition, demand for customization the product needs to be developed. And for development of new products we need employees, managers etc. This in-turn increases the outsourcing of offshore middle managers.

A mouse driver (software) can have a virus if its program gets infected true or False

This is True

It depends on the virus file. Some program need to be execute perfectly if it can be infected with virus. Some applications need not run because of virus files both the situations are possible.

5)Many managers were able to tackle y2k on time and saved billions. true or False;

This is True. After the year 2000, a lot of managers are able to control billions of people because many of the Top MNC's are tackled more by managers.

5 0
4 years ago
Determine the carburizing time necessary to achieve a carbon concentration of 0.30 wt% at a position 4 mm into an iron–carbon al
Ahat [919]

Answer:

the carburizing time necessary to achieve a carbon concentration is 31.657 hours

Explanation:

Given the data in the question;

To determine the carburizing time necessary to achieve the given carbon concentration, we will be using the following equation:

(Cs - Cx) / (Cs - C0) = ERF( x / 2√Dt)

where Cs is Concentration of carbon at surface = 0.90

Cx is Concentration of carbon at distance x = 0.30 ; x in this case is 4 mm = ( 0.004 m )

C0 is Initial concentration of carbon = 0.10

ERF() = Error function at the given value

D = Diffusion of Carbon into steel

t = Time necessary to achieve given carbon concentration ,

so

(Cs - Cx) / (Cs - C0) = (0.9 - 0.3) / (0.9 - 0.1)

= 0.6 / 0.8

= 0.75

now, ERF(z) = 0.75; using ERF table, we can say;

Z ~ 0.81; which means ( x / 2√Dt) = 0.81

Now, Using the table of diffusion data

D = 5.35 × 10⁻¹¹ m²/sec at (1100°C) or 1373 K

now we calculate the carbonizing time by using the following equation;

z = (x/2√Dt)

t is carbonizing time

so we we substitute in our values

0.81 = ( 0.004 / 2 × √5.35 × 10⁻¹¹ × √t)

0.81 = 0.004 / 1.4628 × 10⁻⁵ × √t

0.81 × 1.4628 × 10⁻⁵ × √t = 0.004

1.184868 × 10⁻⁵ × √t = 0.004  

√t = 0.004 / 1.184868 × 10⁻⁵

√t = 337.5903

t = ( 337.5903)²  

t = 113967.21 seconds

we convert to hours

t = 113967.21 / 3600

t = 31.657 hours

Therefore, the carburizing time necessary to achieve a carbon concentration is 31.657 hours

7 0
3 years ago
The shaft is made of A992 steel. It has a diameter of 1 in. and is supported by bearings at A and D, which allows free rotation.
zysi [14]

Answer:

the angle of twist of B with respect to D is -1.15°

the angle of twist of C with respect to D is 1.15°

Explanation:

The missing diagram that is supposed to be added to this image is attached in the file below.

From the given information:

The shaft is made of A992 steel. It has a diameter of 1 in and is supported by bearing at A and D.

For the Modulus of Rigidity  G = 11 × 10³ Ksi =  11 × 10⁶ lb/in²

The objective are :

1) To determine the angle of twist of B with respect to D

Considering the Polar moment of Inertia at the shaft J\tau

shaft J\tau = \dfrac{\pi}{2}r^4

where ;

r = 1 in /2

r = 0.5 in

shaft J \tau = \dfrac{\pi}{2} \times 0.5^4

shaft J\tau = 0.098218

Now; the angle of twist at  B with respect to D  is calculated by using the expression

\phi_{B/D} = \sum \dfrac{TL}{JG}

\phi_{B/D} = \dfrac{T_{CD}L_{CD}}{JG}+\dfrac{T_{BC}L_{BC}}{JG}

where;

T_{CD} \ \  and \ \  L_{CD} are the torques at segments CD and length at segments CD

{T_{BC} \  \ and  \ \ L_{BC}} are the torques at segments BC and length at segments BC

Also ; from the diagram; the following values where obtained:

L_{BC}} = 2.5  in

J\tau = 0.098218

G =  11 × 10⁶ lb/in²

T_{BC = -60 lb.ft

T_{CD = 0 lb.ft

L_{CD = 5.5 in

\phi_{B/D} = 0+ \dfrac{[(-60 \times 12 )] (2.5 \times  12 )}{ (0.9818)(11 \times 10^6)}

\phi_{B/D} = \dfrac{[(-720 )] (30 )}{1079980}

\phi_{B/D} = \dfrac{-21600}{1079980}

\phi_{B/D} = − 0.02 rad

To degree; we have

\phi_{B/D}  = -0.02 \times \dfrac{180}{\pi}

\mathbf{\phi_{B/D}  = -1.15^0}

Since we have a negative sign; that typically illustrates that the angle of twist is in an anti- clockwise direction

Thus; the angle of twist of B with respect to D is 1.15°

(2) Determine the angle of twist of C with respect to D.Answer unit: degree or radians, two decimal places

For  the angle of twist of C with respect to D; we have:

\phi_{C/D} = \dfrac{T_{CD}L_{CD}}{JG}+\dfrac{T_{BC}L_{BC}}{JG}

\phi_{C/D} = 0+\dfrac{T_{BC}L_{BC}}{JG}

\phi_{B/D} = 0+ \dfrac{[(60 \times 12 )] (2.5 \times  12 )}{ (0.9818)(11 \times 10^6)}

\phi_{C/D} = \dfrac{21600}{1079980}

\phi_{C/D} = 0.02 rad

To degree; we have

\phi_{C/D}  = 0.02 \times \dfrac{180}{\pi}

\mathbf{\phi_{C/D}  = 1.15^0}

3 0
3 years ago
Define denial and identify three of your own examples of denial (they can be from your own life or someone else's). In 300 words
Fantom [35]

Answer:

Denial is a defense mechanism which allows an individual not to accept the truth about a painful experience or distress.

Explanation:

Denial is a way of coping with distress. Denial means trying to reject the truth about a situation. It could be denying the truth about your personal situation or about someone else like your friends, parents or siblings.

Denial is a defense mechanism used to protect oneself against accepting a painful experience or situation in life.

Denial could be helpful or harmful.

It can be helpful when one begin to take action about a problem by seeking for help.

It could be harmful if you don't seek for help when in distress.

A person engaged in denial is trying to stay sane and act normal like everything is alright with he/she. The person tries to block negative thought and focus on more positive thoughts.

Example of denial

1) A young lady who just experienced a breakup from her boyfriend who she truly loves but act like the breakup doesn't affect her or that she doesn't love the guy.

2) A 21 year old person who has cancer and has about 10 months to live have plans of celebrating his/her 25th birthday in a big way

3) When someone is harboring the thought that coronavirus is not real or it is not a serious disease.

3 0
3 years ago
Technician A says that reinforcements may be made of plastic,
lord [1]

Answer:

A Only

Explanation:

Reinforcements, as the name suggests, are used to enhance the mechanical properties of a plastic. Finely divided silica, carbon black, talc, mica, and calcium carbonate, as well as short fibres of a variety of materials, can be incorporated as particulate fillers.

3 0
3 years ago
Other questions:
  • Find the velocity and acceleration of box B when point A moves vertically 1 m/s and it is 5 m
    6·1 answer
  • Determine the average and rms values for the function, y(t)=25+10sino it over the time periods (a) 0 to 0.1 sec and (b) 0 to 1/3
    9·1 answer
  • websites, newsgroups, email lists, or other publicly available electronic resources that can help you learn more about the trend
    14·2 answers
  • Assume a 100-m tape measures 3 mm too short. Five measurements of a distance give results of 253.294, 253.287, 253.289, 253.284,
    12·1 answer
  • Compute the atomic density (the number of atoms per cm3 rather than mass density g/cm3) for a perfect crystal of silicon at room
    14·1 answer
  • How do I replace the aromatic filter?
    6·2 answers
  • Multiple Select
    12·1 answer
  • Given a mass-spring-damper system. The impulse response of strength 1 can be obtained from a unit step response by: ______
    14·1 answer
  • What Forces are involved with roller coasters?
    12·2 answers
  • Help with this pls!!!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!