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
Masteriza [31]
4 years ago
9

Which of these loops will initialize each element in the array ar to hold the value 4 ?A. for (int i = 1; i < ar.length; i++

) ar[i] = 4;
B. for (int i = 0; i <= ar.length; i++ ) ar[i] = 4;
C. for (int i = 0; i < ar.length - 1; i++ ) ar[i] = 4; 0%
D. for (int i = 0; i < ar.length; i++) ar[i] = 4;
Computers and Technology
1 answer:
Dima020 [189]4 years ago
8 0

Answer:

Option (d) is correct.

Explanation:

In java language "ar.length" is used to tells the size of the array. The array is used to declare more than one variable. Its index value is started from 0. so when a user needs to initialize the value of an array, they need to start the index value at 0. because ar[0] indicates the first variable of an array.

In option (d), index value is started from 0 and ends with (array_size-1). so it gives the accessed to all the variable of an array and the statement "ar[i]=4;", initialize the value 4 to all array variable.  

while another option is not valid because--

  • In option a, Index value starts from 1 which accesses the second variable of an array.
  • In option b, the statement "i<= ar.length;", gives an unbound array exception because it took the size greater than the array size.  
  • In option c, statement "i<ar.length-1;", can not give accessed to the last element of an array.

You might be interested in
Tanner is creating a brochure for his Web-hosting company. He designed the layout and placed a picture in the center of the page
Romashka [77]
Resizing is a very simple process. On the photo editing program, simply click on the image, and if resize handles appear around it, click and drag those to the desired size. If the program has a dedicated resizing or rescaling tool, use it and follow the above instructions. Keep the photo proportionate by holding down the shift key while dragging a corner handle. <span>Tanner has to make sure that his photo his of a high enough resolution to resize. A pixellated or blurry photo will only get worse when scaled up. He also has to make sure he doesn't resize it to be too big or it will also end up pixellated.</span>
5 0
4 years ago
les agrees to install a new hard drive and software on marilee's computer in exchange for four of her used textbooks. after he i
WARRIOR [948]

Marilee can sue for breach of contract, because Les had a preexisting duty to do all of the work.

What is hard drive ?

The physical device that houses all of your digital stuff is a hard disk. Digital stuff that is kept on a hard drive includes your papers, photos, music, videos, applications, application preferences, and operating system. There are internal and external hard drives.

What is software?

Software is a collection of instructions, data, or computer programs that are used to run machines and carry out particular activities. It is the antithesis of hardware, which refers to a computer's external components. A device's running programs, scripts, and applications are collectively referred to as "software" in this context.

What does running program means?

Double-click the executable file or the shortcut icon pointing to the executable file on Windows to start the program. If you find it difficult to double-click an icon, you can highlight it by clicking it once and then using the Enter key on the keyboard.

Learn more about hardware and software click here:

brainly.com/question/24231393

#SPJ4

8 0
1 year ago
The decryption broker feature is supported by which three Palo Alto networks firewall series
dalvyx [7]

Answer:

See the explanation section

Explanation:

Decryption broker features is supported for the following:

PA-7000 Series devices

PA-5200 Series devices

PA-3200 Series devices

The model supported by the decryption broker features include:

VM-300 model

VM-500 model

VM-700 models.

They usually requires SSL Forward Proxy decryption to be enabled, where the firewall is established as a trusted third party to session traffic.

3 0
3 years ago
When you code a column list in an INSERT statement, you can omit columns with default values and columns that allow ____________
stiks02 [169]

Answer:

NULL is the correct answer of this question.

Explanation:

The insert statement is used for inserting a column list into the database this statement is an under Data Manipulation language.When we insert any column into the database there is always a null value stored.

  • Insert statement is used to insert the data into the database .
  • To insert data following syntax is used:-

         insert into tablename (column data type).

  • When we insert any data into the database the default value is stored is bull.
6 0
3 years ago
What are experts in technology who use their knowledge to break into computers and networks, for profit or just as a challenge k
insens350 [35]

Answer:

Hacker

Explanation:

Hacker -

It refers to the computer software expert , who is responsible to break into the unauthorized networks or computer , is referred to as a hacker .

The hacker is skilled with exceptional computer and computer software knowledge .

Hacking is an illegal practice , as the person is able to access some confidential and personal data and information of any other person or organisation .

Hence , from the given information of the question ,

The correct term is hacker .

3 0
4 years ago
Other questions:
  • The first digital keyboard was the DX-7, introduced by the Yamaha company in 1983.
    15·1 answer
  • A low concentration of market power has positive affects. A low concentration of market share has which of the following effects
    7·1 answer
  • What tabs found in the Windows Task Manager dialog box
    7·1 answer
  • A mother age is formed by reversing the two digits of daughters age. If the mother is 18 years older than daughter and sum of th
    5·1 answer
  • What is the output of 1101 x 10 == 11000 + 10?
    12·1 answer
  • Mobile phones that function as credit cards are called _____.
    11·1 answer
  • Consider the following class:
    12·1 answer
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • 8.7 lesson practice question 1
    13·1 answer
  • What type of attack occurs when the threat actor snoops and intercepts the digital data transmitted by the computer and resends
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!