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
Shtirlitz [24]
3 years ago
11

Consider the following code: String word [] = {"algorithm", "boolean", "char", "double"}; for ( int i =0; i < word.length/2;

i++) { word[i] = word[word.length - 1 - i]; } What is stored in word after running this code? algorithm algorithm algorithm algo
Computers and Technology
2 answers:
KiRa [710]3 years ago
8 0

Answer:

{"double", "char", "char", "double"} will be stored in word.

Explanation:

Given the word is an array of four strings,  {"algorithm", "boolean", "char", "double"}. Hence, the length of the word array is 4.

The for-loop will only run for two iterations due to i < word.length/2, with i = 0 (first loop) and i = 1 (second loop).

In the first loop,  

  • word[word.length - 1 - i]  =  word[4 - 1 - 0]  = word[3]  = "double"
  • Hence, the string "double" will be assigned to word[0] and overwrite "algorithm"

In the second loop,

  • word[word.length - 1 - i]  =  word[4 - 1 - 1]  = word[2]  = "char"
  • Hence, the string "char" will be assigned to word[1] and overwrite "boolean"

At last, the word array will hold {"double", "char", "char", "double"}

omeli [17]3 years ago
5 0

Answer:

At the end of this code word array will hold {"double","char","char","double"}

Explanation:

  • The string word is an array of four strings {"algorithm","boolean","char","double"}.
  • This means that the length of this array is 4.
  • The for runs for half the length of array i.e. 2.

First Loop: (i = 0)

  • For i = 0 word[0] = word[word.length - 1 - 0]
  • Now here we will have word[0] = word [3] which is "double"

Second Loop (i = 1)

  • For i = 1 word[1] = word[word.length - 1 - 1]
  • Now here we will have word[1] = word [2] which is "char"

Rest of the array will remain the same hence the output will be:

word[] = {"double","char","char","double"}

You might be interested in
Any please answer this How much resistance is required to gen-erate 50 mA of current from a 5 volt bat-tery?
nasty-shy [4]

Answer:

Calculating Currents: Current in a Truck Battery and a Handheld Calculator ... (b) How long does it take 1.00 C of charge to flow through a handheld calculator if a 0.300-mA current is ...

7 0
3 years ago
Escribe un ejemplo de:• Software de aplicación. • Software de diagnóstico. • Software de sistema. ayudenme plis, me toca entrega
Afina-wow [57]

Answer:

1. Software de aplicación: Microsoft Word.

2. Software de diagnóstico: Speccy.

3. Software de sistema: Windows operating system (OS).

Explanation:

Un software puede definirse como un conjunto de instrucciones ejecutables (códigos) o una colección de datos que se utiliza normalmente para instruir a una computadora sobre cómo realizar una tarea específica y resolver un problema en particular.

Básicamente, los softwares se clasifican en tres (3) categorías principales y estas son;

1. <u>Software de aplicación</u>: es un software de usuario final que normalmente está diseñado para realizar tareas y funciones específicas.

Algunos ejemplos de software de aplicación son Microsoft PowerPoint, Notepad, Windows Media player, Firefox, Go-ogle Chrome, Adobe Photoshop, AutoCAD, etc.

2. <u>Software de diagnóstico</u>: estos son programas de software que se utilizan para solucionar problemas y posiblemente reparar un sistema informático.

Algunos ejemplos de software de diagnóstico son Speccy, Windows Sysinternals Suite, System Explorer, hddscan, HWiNFO, SIW (System Information for Windows), CPU-Z, HD Tune, etc.

3. <u>Software de sistema</u>: es un software que normalmente está diseñado para ejecutar el hardware de la computadora y todas las demás aplicaciones de software.

Algunos ejemplos de software del sistema son Linux, Windows OS, Mac OS, WinZip, McAfee antivirus, Norton antivirus, Avast antivirus, Piriform CCleaner, Ubuntu, etc.

8 0
3 years ago
While inspecting an element in the DOM on my website using the Chrome Devtools I accidentally deleted the DIV that had all my au
Kobotan [32]

Answer:

Refresh the page, it will reset all the underlying code.

Explanation:

Inspecting an element is essential for web developers in building websites faster and better. The Chrome DevTools is a powerful tool that is integrated into the Chrome browser to assist developers in on-the-go website troubleshooting.

Editing codes in the Chrome DevTools console does not affect the source code of the website hosted on a server, it just provides instant editing functions for troubleshooting or website enhancement.

Therefore, refreshing the page, re-loads the website again from its database which will show the unedited website. In our scenario, after refreshing the page, all the deleted DIV that contains all the authentication will reappear again.

4 0
3 years ago
Concentric circles on a disk platter where data is stored;________
bagirrra123 [75]

Answer:

Tracks

Resilient File System (ReFS)

Explanation:

  1. Concentric circles on a disk platter where data is stored is called Tracks
  2. The new file system developed for Windows Server 2012 is called Resilient File System (ReFS). It allows increased stability for disk storage and improved features for data recovery and error checking
4 0
3 years ago
The first step when entering data is _
34kurt

Answer:

click on the cell

Explanation:

This is a little tricky. We need to first think of the column, then of row, and then click on the corresponding cell. And then we either start typing or move our mouse to highlight the cells. Hence, the correct option here is click on the cell.

3 0
3 years ago
Other questions:
  • Code the function (insertNth list N insValue) which constructs a new list by inserting the specified insValue into the list afte
    6·1 answer
  • Which term describes a protocol to manage a network, able to configure a network, monitor activity, and control devices?
    10·2 answers
  • What UDP port is used by a default WDS server setup when it is listening for PXE boot requests​
    12·1 answer
  • What is an activity that can help you enhance the appearance of your computer’s desktop?
    13·1 answer
  • Graphic design includes typefaces, page layouts, corporate logos, and product packaging. Which modern graphic designer is best k
    14·2 answers
  • Write a regular expression that selects lines containing any of the following words: linux windows solaris macos. For this exerc
    13·1 answer
  • Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grade
    10·1 answer
  • What is computer sences​
    6·1 answer
  • 9. "मेरे तो गिरधर गोपाल, दूसरो ना कोई
    5·1 answer
  • Full meaning of CASE in system analysis
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!