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
Elanso [62]
3 years ago
9

Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void

. It should look like this {5,10,8,9,1}
Computers and Technology
1 answer:
nikitadnepr [17]3 years ago
5 0

Answer:

void printarr(int nums[],int n)

{

   cout<<"{";//printing { before the elements.

   for(int i=0;i<n;i++) // iterating over the array.

   {

       cout<<nums[i];//printing the elements.

       if(i==n-1)//if last element then come out of the loop.

       break;

       cout<<",";//printing the comma.

   }

   cout<<"}"<<endl;//printing } at the end.

}

Output:-

5

1 2 3 4 5

{1,2,3,4,5}

Explanation:

I have created a function printarr of type void which prints the array elements in one line.I have used for loop to iterate over the array elements.Everything else is mentioned in the comments.

You might be interested in
The _____ describes how data actually moves from an application on one computer to an application on another networked computer.
zheka24 [161]

The <u>OSI model</u> describes how data actually moves from an application on one computer to an application on another networked computer.

<h3>What is the OSI model?</h3>

OSI model is an acronym for open systems interconnection and it comprises seven (7) main layers, which typically starts from the hardware layers (layers in hardware systems) to the software layers (layers in software systems)

<h3>The layers of the OSI model.</h3>

Basically, there are seven (7) layers in the open systems interconnection (OSI) model and these include the following in sequential order;

  • Physical Layer
  • Data link Layer
  • Network Layer
  • Transport Layer
  • Session Layer
  • Presentation Layer
  • Application Layer

In this context, we can infer and logically deduce that the <u>OSI model</u> is typically used to describe and illustrate how data moves from a software application on one computer to a software application located on another networked computer.

Read more on OSI model here: brainly.com/question/26177113

#SPJ1

5 0
2 years ago
Which device on a network performs network address translation?
Alika [10]
Network Address Translation<span> (NAT) is the answer</span>
4 0
3 years ago
Help me please with this
LUCKY_DIMON [66]

Answer:

Explanation:

QUestion 2 is A

QUestion 1 is A i think

7 0
3 years ago
Which of the following is the most abstract?
marysya [2.9K]

D. The word "food" is the most abstract because it is the least specific and does not specify what food it is exactly.

Hope this helps!! :)

4 0
3 years ago
Read 2 more answers
A ___ is a node (or a device) that connects two different networks together and allows them to communicate.
stellarik [79]

Answer:

The answer is Hub

Explanation:

A hub, also called a network hub, is a common connection point for devices in a network. Hubs are devices commonly used to connect segments of a LAN. The hub contains multiple ports. When a packet arrives at one port, it is copied to the other ports so that all segments of the LAN can see all packets.

7 0
3 years ago
Other questions:
  • Which of the following is the core of an operating system that maintains the computer’s clock, starts applications, and assigns
    7·1 answer
  • Write a function that takes an array of integers and its size as parameters and prints the two largest values in the array. In t
    5·1 answer
  • What are all the folders located on the DOCK called?
    11·1 answer
  • I love dog my is 16 weeks old how old is yours
    12·1 answer
  • JavaBeans are?A special Java classfileServletsAppletsA Special form of JSPNone of Given
    8·1 answer
  • The simplest element that exists is only one proton and one electron. It is what stars are made of. It's symbol is "H". What is
    9·1 answer
  • Ben is writing a paper for his college history class, and he wants to include some information he found on a Web site. What are
    5·1 answer
  • Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)
    9·1 answer
  • Which of the following is not true?A. An organization may express its cybersecurity state through a Current Profile to report re
    10·1 answer
  • YASHARI earns $27,000 per year, is single, and lives in Wyoming. She has $7000 in Direct Subsidized loans and another $19,000 in
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!