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
erastova [34]
4 years ago
12

Consider the partially-filled array named a. What does the following loop do? (cin is a Scanner object)

Computers and Technology
1 answer:
Keith_Richards [23]4 years ago
4 0

Answer:

Option (1)

Explanation:

value is read outside the loop so it is read only once. After that the loop has begun and in the loop condition it is checked if size < capacity and as size is initialized as 3 so it is true and value if entered more than 0 then loop starts and value is assigned to a[3] and size is incremented and it continues till size is 6 and condition becomes false. So loop executes 3 times but same value is assigned.

You might be interested in
Three PCs are on an Ethernet LAN, connected by a hub. Describe how the Ethernet protocol deals with collisions in this situation
sdas [7]

Answer:

All the ports in a hub are in the same collision domain and a hub sends frames from one host to all other hosts in the network. This makes it prone to collision and poor network throughput. Just like a network switch, it uses the CSMA/CD protocol to detect collision in its network.

A network switch reduces its collision domain to just a port and sends frames from one host to another using its mac table as a route. This makes the network very efficient with high throughput. It also uses the CSMA/CD protocol to detect collision

Explanation:

Switches and hubs are used in networking to connect computer devices in a network. A hub is an obsolete device networking that broadcast a frame to all other ports or host in the network except for the send host port. This increases the rate of collision as all the ports in a hub share the same collision domain. A switch is an efficient frame switching device in a network, which uses its MAC table to decide and find a destination host.

CSMA/CD is a collision detection protocol used in a network to detect and prevent a collision. With this protocol, a host is able to listen, wait, send and resend frames to prevent a collision.

3 0
3 years ago
Why is hard disk called random access medium​
Effectus [21]

Answer:

Data is accessed in a random-access manner, meaning the individual blocks of data can be stored and retrieved in any given order or time.

Explanation:

5 0
2 years ago
Read 2 more answers
PLEASE HELP ME! Will report ignorant answers!
kaheart [24]

Answer:

It is important so your computer can function properly. the two things that might happen if they are not compatible are that it might crash your computer and that your computer might not function properly.

5 0
3 years ago
In 1–2 sentences, describe how you would create a border around a group of cells
iragen [17]
Pick one of the cells you<span> want to format and then click the down arrow beside the </span>Borders<span> button in the Font </span>group<span> on the Home tab. A drop-down menu comes up with all the</span>border<span> options that </span>you can<span> apply to the </span>cell<span> selection</span>
4 0
4 years ago
Read 2 more answers
Write a program that gets five integer test scores from the user, calculates their average, and prints it on the screen. Test yo
Alex

Answer:

total = 0

for i in range(5):

   score = int(input("Enter a score: "))

   total += score

average = total / 5

print("The average is " + str(average))

Explanation:

*The code is in Python.

Initialize the total as 0

Create a for loop that iterates five times. Inside the loop, ask the user to enter a score. Add the score to the total (cumulative sum)

After the loop, calculate the average, divide the total by 5

Print the average

5 0
3 years ago
Other questions:
  • A device that makes it possible for multiple customers to share one address is called a/n _____.
    8·1 answer
  • A(n) _______ is the most basic type of access query
    13·1 answer
  • Create an instance of your queue that accepts java.lang.String Objects. Starting with an empty queue, use the enqueue(E e) metho
    15·1 answer
  • What refers to the protocolâ s ability to ensure that data hasnâ t been modified in any way?
    15·1 answer
  • which software is used to mimic intricate hand drawings into digital paintings? _____ is used to replicate hand drawings into di
    7·1 answer
  • Select the term below which is a protocol that provides a method for software components to communicate, interact, and share dat
    6·1 answer
  • What is an IP address and where I can find the IP address for my computer?
    14·1 answer
  • How do I mark someone brainiest
    9·2 answers
  • I just wanna know how many times a day y'all hit the tutor button at the bottom
    10·2 answers
  • Write a program that outputs "Hello World!".
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!