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]
3 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]3 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
You have a large company, and it is important to your business that your employees' work is backed up regularly. Which network w
valkas [14]
Client server network as it has a powerful server which provides all the networks required on the network. Files are usually backed up regularly.

3 0
4 years ago
Someone once observed that "the difference between roles and groups is that a user can shift into and out of roles, whereas that
mestny [16]

Answer:

All things considered newgrp has nothing to do with security jobs.  

newgrp sets the procedures bunch id which is in many frameworks are irrelevant. All gatherings are accessible. Gatherings are characterized as assortment of clients , bunch get to is conceded to documents dependent on the record gathering.  

Regularly (setgroups/getgroups ) all gatherings are in the process get to list.  

The authorization at a document or registry level has a 3 level arrangement of consents, for example, client proprietorship , bunch possession and others. All things considered the document authorization are a mix of read , compose and execute .we need both peruse and execute consent to run a program.  

A procedure may get to the document if a record has a place with the user(the proprietor of the document ) or if the gathering identifier coordinate on the gatherings in the clients bunches list. That entrance is constrained by the relating consents signals on the record.  

Gatherings have been over-burden with some "job" definitions. In any case, these are just over-burden and not a decent utilization of groups,the utilization of a gathering as a job was bolstered by the setgroup id banner , and by utilities like a sudo , where gathering name likewise coordinates a security control. It expect that the gathering name isn't utilized for documents yet once a client is in the gathering that client can apply the gathering to a record regardless of whether it isn't what the gathering was for.  

This over-burden use worked where frameworks didn't bolster genuine jobs. The over-burden utilize was only a work around.  

Linux has genuine job definition bolstered by SELinux models and can be applied to documents , clients , and forms.

7 0
4 years ago
Traffic collisions are among the top killers of children in America.
Blababa [14]
Whats the question if its true or false, then true
8 0
3 years ago
What is the financial aspect for a business as to what database software they will buy?
Masteriza [31]

Answer:  Database software is bought on basis of the processing, cost, requirement etc for any particular . According to the financial perspective the database  software should have the following characteristics:-

  • Database software that has most accurate and main feature according to the business requirement is selected for buying and the others with extra features are not considered as more feature cost more amount  which is not needed.
  • Database software which is still in progress to be built is pre-booked and money is invested on it because the price of the required software might increase after getting completed.
  • Scalable database software should be bought so that it can extend according to need at low cost.

 

8 0
4 years ago
1.<br> Why do you need to use sources of information when writing a formal business<br> document?
Lera25 [3.4K]

Answer:

You need sources of information when writing a formal business document because, if the person receiving the document would like to see the full source you got your information from it could help them understand better what they are reading. Also it looks more professional.

Explanation:

4 0
3 years ago
Other questions:
  • One critique of determining the effectiveness of the psychodynamic perspective is that its theories are too vague to test. t/f
    14·2 answers
  • To change the tab order in which fields are encountered on a form, click the tab order button on the ____ tab.
    15·1 answer
  • You can join tables by using a condition in the ____ clause.​
    7·1 answer
  • An “evil twin” in the context of computer security is: a) A virus-laden attachment that looks just like a sincere attachment b)
    5·1 answer
  • Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
    15·2 answers
  • What kind of security features does Microsoft Security Analyzer promise?
    5·1 answer
  • When would it be easier to use Cut and Paste over Drag and Drop? Explain?
    6·1 answer
  • What is difference between rand() and srand() ?
    11·1 answer
  • A(n) ______ page is the page on a website that a visitor sees when he or she clicks a link from an ad, a search engine result, o
    6·1 answer
  • Using complete sentences post a detailed response to the following.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!