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
zmey [24]
2 years ago
14

Write a program called array1.cpp file that use either regular for loop or range based for loop to display the contents of the a

rray test []. You can also write a function to display the contents of array. Submit your code array1.cpp to Blackboard.
Computers and Technology
1 answer:
ch4aika [34]2 years ago
7 0

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

void display(int array_test [], int n){

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

       cout<<array_test[i]<<" ";   }

}

int main(){

   int n;

   cin>>n;

   int array_test[n];

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

       cin>>array_test[i];

   }

   display(array_test,n);

   return 0;

}

Explanation:

This defines the display function

void display(int array_test [], int n){

This iterates through the array

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

This prints each element of the array

       cout<<array_test[i]<<" ";   }

}

The main begins here

int main(){

This declares n as integer; n represents the length of the array

   int n;

This gets input for n

   cin>>n;

This declares the array

   int array_test[n];

The following iteration gets input for the array

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

       cin>>array_test[i];

   }

This calls the display function to display the elements of the array

   display(array_test,n);

   return 0;

}

You might be interested in
The Windows Net use command is a quick way to discover any shared resources on a computer or server. True or False
V125BC [204]
Yes it’s true the window net use command is a quick way to discover any shared resources on a computer or server
8 0
2 years ago
What icon might you see in device manager that indicates a problem with a device?
Nataly_w [17]
A yellow triangle with a exclamation mark might appear if a problem is detected with the device. Of course, this is different depending on the version of Windows you have.
7 0
3 years ago
What types of messages flow across an SDN controller’s northbound and southbound APIs? Who is the recipient of these messages se
Marta_Voda [28]

Answer and Explanation:

Messages flow across an SDN controller's:  

Northbound APIs:  

• Messages which help in read/write state of the network and developing flow tables within the  

state management layer.  

• Notifications for the state-change events.  

• The interaction between the controller and network control applications is done through the  

northbound interface.  

• Network control applications send messages to the controller.  

Southbound APIs:  

• Messages which help for the up-to-date view of the network's state like message for the  

attached link has gone up or down, new devices are joined the network, or indications of the  

device is up or down.  

• Controller's southbound interface is the communication among the controller and the controlled  

devices. Controlled devices are the recipients of the messages sent form the controller.  

3 0
3 years ago
Linux implements _________ to determine how a user is to be authenticated and whether there are password policies associated wit
ira [324]

Answer:

Pluggable authentication modules (PAM).

Explanation:

These are schemes that are seen to be used in API authentication. It is relyed on to provide high authentification protocool in any correct form it is seen to be in use. also its ability to grant access to each other within two people interface are reasons big user clients refer to it in most of their policies that deals with their working system passwords and their database passwords to most of their files. This is why the company in the context which is a big firm rely on it for its services.

6 0
2 years ago
A person using a prosthetic device can easily overheat on a hot vehicle. <br> a. True<br> b. False
Anni [7]
Is is actually A. True

The human body regulates body temperature through the skin and sweating and being an amputee can reduce this.
4 0
2 years ago
Other questions:
  • In three to five sentences, describe how good e-mail work habits increase workplace efficiency and productivity.
    12·1 answer
  • How do you get free Wifi on your phone without paying
    6·1 answer
  • Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a python prog
    11·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • A(n) ____ uses the communication interface to request resources, and the server responds to these requests.
    15·1 answer
  • What is the Intranet?<br>​
    5·1 answer
  • If cell G7 contains the function ________, it states that if the value in cell C3 is 9, the number 7 will be assigned to cell G7
    6·1 answer
  • The best way to take control of the first page of Google is to
    14·1 answer
  • a client has requested adjustments to the arrangement and placement of elements on an image. what does the client want changed?
    9·1 answer
  • Creating a wedding website on the knot- how to make the text wide
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!