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
pshichka [43]
3 years ago
13

What does the statement that follows do? double gallons[6] = { 12.75, 14.87 }; a. It assigns the two values in the initializatio

n list to the first two elements but leaves the other elements with the values currently in memory. b. It assigns the two values in the initialization list to the first and second elements, third and fourth elements, and fifth and sixth elements. c. This statement is invalid. d. It assigns the two values in the initialization list to the first two elements and default values to the other elements.
Computers and Technology
1 answer:
Serhud [2]3 years ago
3 0

Answer:

It assigns the two values in the initialization list to the first two elements and default values to the other elements.

Explanation:

Given

The array initialization

Required

Interpret the statement

double gallons[6] implies that the length/size of the array gallons is 6.

In other words, the array will hold 6 elements

{12.75, 14.87} implies that only the first two elements of the array are initialized ; the remain 4 elements will be set to default 0.

You might be interested in
100 POINTS NEED THIS BEFORE 11:59 TODAY!!!!!!!!!!!!!!!
AVprozaik [17]

Answer:ok be how hobrhkihfehgdhdj fuiufiisefif jfkijfjfhhfhfhfhf

Explanation:

5 0
2 years ago
Write a program that reads in 10 numbers from the user and stores them in a 1D array of size 10. Then, write BubbleSort to sort
Diano4ka-milaya [45]

Answer:

The solution is provided in the explanation section.

Detailed explanation is provided using comments within the code

Explanation:

import java.util.*;

public class Main {

//The Bubble sort method

public static void bb_Sort(int[] arr) {  

   int n = 10; //Length of array  

   int temp = 0; // create a temporal variable  

   for(int i=0; i < n; i++){  

         for(int j=1; j < (n-i); j++){  

           if(arr[j-1] > arr[j]){  

               // The bubble sort algorithm swaps elements  

               temp = arr[j-1];  

               arr[j-1] = arr[j];  

               arr[j] = temp;  

             }  

         }            

         }  

        }

 public static void main(String[] args) {

   //declaring the array of integers

   int [] array = new int[10];

   //Prompt user to add elements into the array

   Scanner in = new Scanner(System.in);

   //Use for loop to receive all 10 elements

   for(int i = 0; i<array.length; i++){

     System.out.println("Enter the next array Element");

     array[i] = in.nextInt();

   }

   //Print the array elements before bubble sort

   System.out.println("The Array before bubble sort");

   System.out.println(Arrays.toString(array));

   //Call bubble sort method

   bb_Sort(array);  

               

   System.out.println("Array After Bubble Sort");  

   System.out.println(Arrays.toString(array));

 }

}

8 0
2 years ago
What language used orthogonality as a primary design criterion?
pogonyaev
LIPS a functional language is one in which computations are made primarily by applying function to given program
4 0
3 years ago
Databases offer many security features including passwords to provide authentication, access levels to determine who can access
Murljashka [212]

Answer:

True

Explanation:

When using databases in a project, not everyone has the same access level, e.g the database admin may have the highest level of access (access to data on live mode), the software testers have their own level of access (access to data on test mode) and so on.  

7 0
3 years ago
Information that indicates ground air or navy force levels or dispositions is what security?
AlexFokin [52]

Information that indicates ground air or navy force levels or dispositions is <u>confidential</u> security.

Security for a country's higher organizations is essential for a nation's protection.

Serious information like the nuclear organizations, army, navy, and ground air is at a higher risk for threats and hence requires higher security.

The information in such higher organizations is kept confidential and no third person is allowed access to the code of conduct of such organizations.

If information is leaked from the ground air or from navy force levels then there can be serious consequences for it. Hence, such information is always kept under confidential security.

To learn more about security, click here:

brainly.com/question/25375059

#SPJ4

8 0
1 year ago
Other questions:
  • Hub is used in Twisted pair Ethernet. True/False
    6·1 answer
  • On five lane roadways, the center lane is designated for __________ and is used by vehicles traveling in both directions.A. Thro
    15·1 answer
  • You can count on everything online to be 100% accurate. <br> A. FALSE <br> B. TRUE
    11·2 answers
  • Hi All,
    12·2 answers
  • me pueden ayudar con mi trabajo sii porfss si me dan la respuesta correcta y les doy la mejor coronita si​
    12·1 answer
  • An example of computer hardware is ? A. keyboard B. app C. web browser D. operating system
    13·2 answers
  • In one to two sentences, describe how you would add a new slide to your presentation.
    11·2 answers
  • Which programming paradigm does the programming language JavaScript follow?
    14·1 answer
  • How can a cell phone tower help people​
    11·2 answers
  • Match the ernerging technologies to their descriptions.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!