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
Viktor [21]
2 years ago
6

Why is the answer B?

Computers and Technology
1 answer:
DIA [1.3K]2 years ago
4 0

Answer:

The first for loop will add =["1", "2",..............."10"]

The second for loop will delete 1, 3, 5, 7, 9

Since, k = 1 and the k = 1+2 =3 and so on till 9, and not 11 as 11 is more than 10.

And hence, the output will be [2,4,6,8,10] and which is B.

Explanation:

B is the correct answer, and as explained in the answer section.

You might be interested in
Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one
Galina-37 [17]
Is advertising influencing her?
What are her motivations?
Has she compared prices?
Is she buying at the right time?
5 0
2 years ago
Read 2 more answers
How does Python recognize a tuple?
Maru [420]

Answer:

You use parentheses around the data values.

Explanation:

j took the test on edge

4 0
2 years ago
Write a method swaparrayends() that swaps the first and last elements of its array parameter. ex: sortarray = {10, 20, 30, 40} b
Alexus [3.1K]
In the C programming language, you can't determine the array size from the parameter, so you have to pass it in as an extra parameter. The solution could be:

#include <stdio.h>

void swaparrayends(int arr[], int nrElements)
{
int temp = arr[0];
arr[0] = arr[nrElements - 1];
arr[nrElements - 1] = temp;
}


void main()
{
int i;
int myArray[] = { 1,2,3,4,5 };
int nrElements = sizeof(myArray) / sizeof(myArray[0]);
swaparrayends(myArray, nrElements);

for (i = 0; i < nrElements; i++)
{
printf("%d ", myArray[i]);
}

getchar();
}

In higher languages like C# it becomes much simpler:

        static void Main(string[] args)
        {
            int[] myArray = {1, 2, 3, 4, 5};
            swaparrayends(myArray);
            foreach (var el in myArray)
            {
                Console.Write(el + " ");
            }

            Console.ReadLine();
        }

        static void swaparrayends(int[] arr)
        {
            int temp = arr[0];
            arr[0] = arr.Last();
            arr[arr.Length - 1] = temp;
        }

3 0
3 years ago
Operating systems are designed to work with specific hardware. Which operating system works with Apple computers?
Ghella [55]
2. Mac and to be more precisely, OS X
5 0
3 years ago
Read 2 more answers
How do I type over Images (photo posted ​
Ber [7]
Oh a document, I do not believe that you have type on images, but if you were to type a text in a app called PicsArt and saved it and then put it onto the document over the picture it would work.
3 0
2 years ago
Read 2 more answers
Other questions:
  • When using a template to compose a memorandum which key on the keyboard moves the cursor to the next field
    15·1 answer
  • The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
    10·1 answer
  • How can I make my Wi-Fi signal fast? I am going through my exam but my Wi-Fi is not supporting plz help.
    12·1 answer
  • Which of the following menu commands would you select to make a copy of an open file and rename it?
    15·1 answer
  • Who created the first photograph
    9·2 answers
  • Write a class called Date that represents a date consisting of a day, month, and year. A date object should have the following m
    10·1 answer
  • Write a calculate_sq_inches_of_good_pizza function that accepts the diameter of a pizza and returns the area of the pizza minus
    7·1 answer
  • Write a Java program that has a static method named range that takes an array of integers as a parameter and returns the range o
    10·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
  • An employee of a large corporation remotely logs into the company using the appropriate username and password. The employee is a
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!