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 are supercapacitors ?
OLEGan [10]

Answer:

A supercapacitor, also called an ultracapacitor, is a high-capacity capacitor with a capacitance value much higher than other capacitors, but with lower voltage limits, that bridges the gap between electrolytic capacitors and rechargeable batteries.

Explanation:

6 0
3 years ago
Read 2 more answers
25 In differential aeration corrosion, rich oxygenated parts are
sleet_krkn [62]

Answer:what are you trying to say

Explanation:

6 0
3 years ago
To measure the voltage drop across a resistor, a _______________ must be placed in _______________ with the resistor. Ammeter; S
gulaghasi [49]

Answer:

The given blanks can be filled as given below

Voltmeter must be connected in parallel

Explanation:

A voltmeter is connected in parallel to measure the voltage drop across a resistor this is because in parallel connection, current is divided in each parallel branch and voltage remains same in parallel connections.

Therefore, in order to measure the same voltage across the voltmeter as that of the voltage drop across resistor, voltmeter must be connected in parallel.

4 0
3 years ago
Ben İngiliz oldum düzelte bilirmiyim
Lelu [443]

Answer:

What laguange is that?

Explanation:

7 0
3 years ago
When you first start a car after it has been sitting for more than an hour, it pollutes up to ......times more than when the eng
lesya [120]
20 time more then when it’s warm
6 0
3 years ago
Read 2 more answers
Other questions:
  • What are the three main areas of bioengineering?
    11·1 answer
  • Explain the two advantages and the two disadvantages of fission as an energy source.
    12·1 answer
  • Three consequences of unbalanced wheels on a motor vehicle​
    11·1 answer
  • C programming fundamentals for everyone​
    13·1 answer
  • The Aluminum Electrical Conductor Handbook lists a dc resistance of 0.01558 ohm per 1000 ft at 208C and a 60-Hz resistance of 0.
    11·1 answer
  • 2. The following segment of carotid artery has an inlet velocity of 50 cm/s (diameter of 15 mm). The outlet has a diameter of 11
    13·1 answer
  • T
    11·1 answer
  • : A drive system using the electric motor is under load as 75Nm with an angular velocity of 100rad/s, then the electric motor is
    11·1 answer
  • Hi gospelgamer10 lol
    9·2 answers
  • which of the following tools is used for measuring small diameter holes which a telescoping gauge cannot fit into? A. telescopin
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!