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
s) Use Cramer’s rule to solve the system below, and state the condition at which solution exists. ax+by = 1 cx+dy =−1
Zanzabum

(a) The solution to the system of equation is, x = (d + b)/(ad - cb) and y = (-a - c)/(ad - cb).

(b) The condition at which the solution exists is, ad - cb ≠ 0.

<h3>Solving the system of equation with Cramer's rule</h3>

ax + by = 1

cx + dy = -1

D = [a   b]

      [c    d]

D = ad - cb

Dx = [1   b]

       [-1   d]

Dx = d + b

Dy = [a   1]

       [c  - 1]

Dy = -a - c

x = Dx/D

x = (d + b)/(ad - cb)

y = Dy/D

y = (-a - c)/(ad - cb)

Cramer's rule applies to the case where the coefficient determinant is nonzero.

Thus, D ≠ 0 (ad - cb ≠ 0).

Learn more about Cramer's rule here: brainly.com/question/10445102

#SPJ1

4 0
2 years ago
Example 12: Write an algorithm and draw a flowchart to calculate
Ilya [14]

Answer:

An algotherum is a finite set of sequential instructions to accomplish a task where instructions are written in a simple English language

7 0
3 years ago
The rate of energy transfer by work is called power. a)-True b)-False
Pie

Answer:

Yes the statement is true.

Explanation:

Power is defined as the rate at which energy is transferred by an object on account of work done.

Mathematically

Power=\frac{dE}{dt}

An object that does work loses it's energy while an object on which work is done gains energy.

Power is often dependent on the type of energy transfer thus we have Electrical Power, Mechanical Power depending on the type of energy involved in the system.

Concept of power is important since it gives us a measure of how fast energy can be derived to given to a system.

5 0
3 years ago
Why do the quadrants in coordinate plane go anti-clockwise?.
tia_tia [17]

Answer:

Quadrants are counter-clockwise because angles are measured counter-clockwise; and angles are measured counter-clockwise so that Cross Product of unit vector in X direction with that in the Y direction has to be the unit vector in the Z direction (coming towards us from the origin).

Explanation:

7 0
2 years ago
. H<br> Kijwhayhwbbwyhwbwbwgwwgbwbwhwh
dsp73
Yes. Gggggggggghhhhh
3 0
3 years ago
Read 2 more answers
Other questions:
  • Technician A says that you don’t need to use an exhaust extraction system when working on vehicles equipped with a catalytic con
    9·1 answer
  • For problems 1 and 2, six luminaires, similar to Style E used in the Commercial Building, are to be installed in a room that is
    13·1 answer
  • Underlining words and highlighting dates are part of a student's personal note taking key.
    6·2 answers
  • 7. A single-pole GFCI breaker is rated at
    9·1 answer
  • You are given a C program "q2.c" as below. This program is used to calculate the average word length for a sentence (a string in
    5·1 answer
  • Guess the output of this code: print( (3**2)//2)​
    13·1 answer
  • Help me, iv been having problems with ads going in my phones storage files, what can i do to stop this?
    14·2 answers
  • Does anyone know obamas last name???? please help its for a friend I swear!!!111!!11!
    8·1 answer
  • Why is personal development necessary based activity success life and career​
    11·1 answer
  • Might a synchronous motor equally well be called a synchronous inductor
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!