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]
4 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]4 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
What 2 important components are found on a motherboard? (2 points each)
Inga [223]
Is this a multiple choice? If so what are the options?
7 0
3 years ago
What problem is http solving?
tia_tia [17]

Answer:

umm i need more descriptive details to answer the question buddy

4 0
4 years ago
The strength of the electromagnetic waves being radiated from an antenna is referred to as gain, which involves a measurement of
Mars2501 [29]

Answer:

Explanation:

dB - decibels - this is the ratio of power radiated to a reference value (signal strength)

i - isotropic - this represents a theoretical antenna that radiates an equal amount of power in all directions.

formula for antenna this:

GdBi=10*log^10(G)

5 0
3 years ago
Long distances are usually measured in kilometers.<br> T or F?
timama [110]
Depending where you are in the world it is true and false
7 0
3 years ago
Which of the following is NOT a best practice to protect data on your mobile computing device?
OleMash [197]

<u>Lock your device screen when not in use and require a password to reactivate</u> is not a best practice to protect data on your mobile computing device.

<h3>What is a mobile computing device?</h3>

Any device that was built using mobile parts, such as mobile hardware and software, is referred to as a mobile computing device. Portable devices that can function like a typical computing device in terms of operation, execution, and provision of services and applications are known as mobile computing devices.

Portable and handheld computing devices are other names for mobile computing devices.

Modern handheld devices that have the hardware and software needed to run common desktop and Web applications are generally referred to as mobile computing devices. Similar hardware and software elements found in personal computers, such as processors, random memory and storage, Wi-Fi, and an operating system, are also found in mobile computing devices. They are made specifically for mobile architecture and portability, which sets them apart from PCS.

Learn more about mobile computing devices

brainly.com/question/8189998


#SPJ1

4 0
1 year ago
Other questions:
  • ?trophic levelNYIGVU.;/IO9YK7,'0;
    12·1 answer
  • Write a program that opens a text file and reads its contents into a queue of characters. The program should then dequeue each c
    11·1 answer
  • According to many experts how often should files be backed up
    12·2 answers
  • Operational feasibility, which refers to user acceptance and support, as well as management acceptance and support, is also know
    9·1 answer
  • Write a C++ program that asks the user to enter his age. The program then should display the age in months:
    11·1 answer
  • Select the first ICMP Echo Request message sent by your computer, and expand the Internet Protocol part of the packet in the pac
    10·1 answer
  • You can perform an in-place upgrade to Windows 7 from both Windows XP and Windows Vista
    10·1 answer
  • 9.6 Code Practice, this is in Python, I need its quick!
    13·1 answer
  • An 802. 11 frame contains a number of fields. Which field describes the version of 802. 11 that is being used?
    10·1 answer
  • Why key logger are essential for computer system
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!