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
The email application used by Jim’s office is sending emails with viruses attached to them to user’s computers. What step should
Finger [1]
Delete the program and install a new software.
5 0
3 years ago
Read 2 more answers
How can IT infrastructure be linked to the business strategy of any organization
Anni [7]

Answer:

The overview of the situation is discussed in the following part.

Explanation:

It's indeed real that perhaps IT technology will have a strategic edge and improved market efficiency. IT technology can improve the protection, accessibility, and efficiency of any enterprise.

Numerous massive, small as well as medium-sized companies or beginning are currently preparing their growth plans by sustaining a stable IT infrastructure throughout the place that will ensure and increase their profitability.

<u>Those same years, the accompanying IT infrastructure is being used to connect the market strategy</u>:

  • Broadband and Wireless Connectivity,
  • Security and Risk Management,
  • IT Structure Strategy,
  • Performance Strategy, etc.
7 0
3 years ago
If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
Mkey [24]

Answer:

A.1.

Explanation:

CCS(Centum Call Seconds) is a unit to measure the network traffic in the telecommunication circuit network.        

1 Traffic unit = 1 Erlang.      

The relation between Erlang and CCS(Centum Call Seconds) is:-

36 CCS = 1 Erlang.          

Hence the answer to this question is 1 Erlang.

5 0
3 years ago
How to cite a website, like asha.org?
inn [45]
Using the APA style or the<span> American Psychological Association style of referencing or citing sources, the structure for website reference is as follows:
</span>Last, F. M. (Year, Month Date Published). Article title<span>. Retrieved from URL. Hence, for the problem:
</span>Last, F. M. (Year, Month Date Published). Article title<span>. Retrieved from http://www.asha.org</span>
8 0
3 years ago
The Healthy Nutrition Counseling Center and the Simple Solutions Software Company have recently joined forces to produce a meal
labwork [276]

Answer: (B) Strategic alliance.

Explanation:

The strategic alliance is one of the type of the agreement that help the organization for developing the effective processes. The strategic alliance basically allow associations, people or different substances to move in the direction of normal or connecting objectives.

The main advantage of the strategic alliance is that in terms of economical condition it reduces the overall, risks in the process and also reduced the costs. This technique basically include new technologies and diversifying services and the products.  

Therefore, Option (B) is correct.

5 0
3 years ago
Other questions:
  • Your company is implementing a wireless network and is concerned that someone from a competing company could stand outside the b
    14·1 answer
  • _______ data would be useful for creating a report containing last year's revenue, which won't be changing.      A. Integrated B
    12·1 answer
  • Which technology can be used to protect the privacy rights of individuals and simultaneously allow organizations to analyze data
    13·1 answer
  • What is the output of the following Java code?int x = 1;do{System.out.print(x + " ");x--;}while (x &gt; 0);System.out.println();
    14·1 answer
  • What type of cable would you use to connect two hosts together in a back-to-back configuration using twisted pair cable?
    15·1 answer
  • Write a recursive function that returns true if the digits of a positive integer are in increasing order; otherwise, the functio
    15·1 answer
  • A good practice when using public domain content is to
    7·1 answer
  • Viruses which activate themselves after a specific time is called
    10·2 answers
  • Where do you interact with databases on a daily basis?
    10·2 answers
  • ________ take advantage of vulnerabilities in software. Group of answer choices Blended threats Bots Trojan horses Direct-propag
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!