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
Arada [10]
3 years ago
11

Consider the following declaration: double[] sales = new double[50]; int j; Which of the following correctly initializes all the

components of the array sales to 10.
(i) for (j = 0; j < 49; j++) sales[j] = 10;
(ii) for (j = 1; j <= 50; j++) sales[j] = 10;
Computers and Technology
1 answer:
vlada-n [284]3 years ago
3 0

Answer:

The answer is "None of these".

Explanation:

In the given question an array "sales[]" is declared, which contains 50 double type elements, and in the next line, an integer variable j is defined, which uses a for loop. In this question two options is given, in which both are not correct, that can be described as follows:

  • In option (i), A loop is defined that, uses variable j which starts with 0 and ends with 48, So total elements are 48 that's why it is not correct.
  • In option (ii), A loop will use variable j that, starts with 1 and ends with 49, That's why it is not correct.
You might be interested in
According to programming best practices, how should you handle code that needs to be repeated several times in a program?
ahrayia [7]

Explanation:

Copy the code as many times as needed so that each usage is separate.

8 0
3 years ago
How many of yall are willing to subscribe to my channel called "Space Juice" with around 245 subs?!​
Sliva [168]

Answer:

I will

Explanation:

4 0
3 years ago
Describe the concepts of Defense in Depth and Detection in Depth. Compare and contrast. What's different? What's similar?
olchik [2.2K]

Answer:

 The main concept of the defense in depth is that the various defensive mechanism series are used for protecting the data and the information in the system. This approach is basically used multiple layers to control the cyber security. It also mainly provide the redundancy for controlling the security failure in the system.

The detection in depth basically provide the redundant overlapping approach and it is used for detecting the security and also accomplish the response that are available in the security detection.  

5 0
3 years ago
Assume that a kernel is launched with 1000 thread blocks each of which has 512 threads. If a variable is declared as a shared me
Alex

Answer:

The answer to this question is the option "B".  

Explanation:

In this question, the answer is option B which is 1,000 because the kernel is a central part of an operating system. kernel manages the computer and the hardware operations. most especially memory and CPU time. It also sheared a memory variable is allocated to thread blocks. That's why the answer to this question is 1,000.

7 0
3 years ago
Which of these statements about the truck driving occupation in the U.S. are accurate?
Airida [17]

Answer:

I'm unsure 38373672823

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • The position of a _____ is a nontechnical position responsible for defining and implementing consistent principles for setting d
    15·1 answer
  • If anything is changed on an already-tested module, regression testing is done to be sure that this change hasn’t introduced a n
    13·1 answer
  • Most hand sewing begins and ends with
    5·1 answer
  • You're setting up some VMs to test an application you're considering making available to employees of the small company you work
    11·1 answer
  • People who enjoy working with their hands might enjoy a career as a/an
    9·1 answer
  • Ayuda no encuentro la información de estas tres preguntas:
    10·1 answer
  • Which type of loan is based on financial need
    6·1 answer
  • Application of computer in insurance​
    14·1 answer
  • Array bounds checking should be directly coded into a system rather than assumed.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!