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
Alborosie
3 years ago
8

Write a function that dynamically allocates an array of integers. The function should accept an integer argument indicating the

number of elements to allocate. The function should return a pointer to the array. Call the function in a complete program.
Computers and Technology
1 answer:
viktelen [127]3 years ago
5 0

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

int* integerArr( int number);

int main(){

   int* address;

   address = integerArr(5);

   for ( int i = 0; i < 10; i++ ) {

     cout << "Address of the integer array:  ";

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

   }

   return 0;

}

int* integerArr( int number){

   int myArr[number];

   for (int i = 0; i < number; ++i) {

     myArr[i] = rand();

   }

   int* ptr= myArr;

   return ptr;

}

Explanation:

The C++ source calls the defined pointer function "integerArr" with an integer argument to declare arrays of dynamic length, in the main function of the program and the items of the array are printed on the screen.

You might be interested in
In cell h15 enter a vlookup function to determine the 2018 percentage of total attendance for the city listed in cell h14. Use t
Amanda [17]

Answer:

=vlookup(h14, a5:h11,8,false)

Explanation:

Here, h15 is the cell in which we need the output and the value to be matched in rows to find the exact row is h14, and the range is expressed as a5:h11. Now to find the column number, we need to figure out the first and the concerned column. So, the concerned column is in which the total attendance is being listed and it is h(h14), and the first column is a. So, the column number is a=1 h=8, =8. And since we need the exact match, the value of the fourth argument is false. And thus, we have the above formula. Remember. vlookup formula is:

=vlookup(cell where the result is to be placed, range, column number in the same row as h14, exact match or approximate match). For exact match it's false, and for the approximate match, it's true.

8 0
3 years ago
What color pixels are used in a camera?
Murljashka [212]
Red, blue, and green color pixels are used in a camera
3 0
2 years ago
Read 2 more answers
There is overlap in the subjects of study in the different information technology disciplines. true or false
OlgaM077 [116]

The question statement is true that there is overlap in the subject of study in different information technology discipline.

It is true that there is overlap in the subjects of study in the different information technology disciplines. The disciplines are collectively known as the disciplines of computing. Computer science, computer engineering, information technology, information systems, and software engineering all come in the realm of computing disciplines. These are the five distinct computing disciplines with overlapping subjects of study.

These disciplines are said to be interrelated as computing is their main area of study, yet they are distinct since each has its own curricular focus, research perspective and career prospects.

  • Computer science: Computer science as the discipline deals with designing and implementation of operating systems and software, including the study of computation and computability.
  • Computer engineering: As a discipline, computer engineering concerns with making different parts of computers work together. Research, design and development of computer-based equipment and hardware are also area of study in this discipline.
  • Information technology: Information technology as an area of study is mainly concerned with automation of business operations. It provides support through software and computers to handle data and innovate business processes.
  • Information systems: Information system as a discipline provides area of study which makes people able to apply advance information technology to solve today’s problem primarily within an organizational and enterprise settings.
  • Software engineering:  Software engineering is the discipline concerns with the designing, development, maintenance, testing, and evaluation of computer software and applications to solve real world problems.

You can learn more about information technology at

brainly.com/question/14688347

#SPJ4

7 0
1 year ago
1. What is the main factor that affects Earth’s average temperature?
user100 [1]

Answer:

1. The Sun is the primary source of energy that influences any planet's temperature, including Earth. The amount of energy received from the Sun is called insolation; the ratio reflected is called the albedo.

2.There are three major ways in which global warming will make changes to regional climate: melting or forming ice, changing the hydrological cycle (of evaporation and precipitation) and changing currents in the oceans and air flows in the atmosphere

3.The warming of Earth is primarily due to accumulation of heat-trapping greenhouse gases, and more than 90 percent of this trapped heat is absorbed by the oceans. As this heat is absorbed, ocean temperatures rise and water expands. This thermal expansion contributes to an increase in global sea level.

4.The main sources of greenhouse gases due to human activity are: burning fossil fuels leading to higher carbon dioxide concentrations. farming and forestry — including land use change via agriculture and livestock. cement manufacture.

5. - Reduce, Reuse, Recycle

- Use Less Heat and Air Conditioning

-Use Less Hot Water

Explanation:

5 0
3 years ago
How long does a bankruptcy affect your financial reputation
Diano4ka-milaya [45]
It effects it until it is refilled to its normal amount
3 0
3 years ago
Other questions:
  • I need help answering these questions!
    11·1 answer
  • What is the description of a computer ram?
    7·1 answer
  • Are the buying and selling of stocks centralized activities? Why or why not?
    10·2 answers
  • Which of the following is not a hazard a driver might encounter?
    5·1 answer
  • In your own words, describe how a network administrator can use the OSI model to isolate a network problem.
    13·1 answer
  • Netflix shows to watch?
    11·2 answers
  • Which of the following technologies does NOT facilitate the transferring of data between computers in adjacent buildings?
    12·1 answer
  • I have a top-secret recipe for the greatest cookie dough I have made and I want to keep the recipe a secret so I apply for a? *
    15·1 answer
  • Match the feature to its function.
    7·1 answer
  • What is the Cycle of Dependency?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!